/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/
#line 52 "parse.y"

#include "sqliteInt.h"

/*
** Disable all error recovery processing in the parser push-down
** automaton.
*/
#define YYNOERRORRECOVERY 1

/*
** Make yytestcase() the same as testcase()
*/
#define yytestcase(X) testcase(X)

/*
** Indicate that sqlite3ParserFree() will never be called with a null
** pointer.
*/
#define YYPARSEFREENEVERNULL 1

/*
** In the amalgamation, the parse.c file generated by lemon and the
** tokenize.c file are concatenated.  In that case, sqlite3RunParser()
** has access to the the size of the yyParser object and so the parser
** engine can be allocated from stack.  In that case, only the
** sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked
** and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be
** omitted.
*/
#ifdef SQLITE_AMALGAMATION
# define sqlite3Parser_ENGINEALWAYSONSTACK 1
#endif

/*
** Alternative datatype for the argument to the malloc() routine passed
** into sqlite3ParserAlloc().  The default is size_t.
*/
#define YYMALLOCARGTYPE  u64

/*
** An instance of the following structure describes the event of a
** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
** TK_DELETE, or TK_INSTEAD.  If the event is of the form
**
**      UPDATE ON (a,b,c)
**
** Then the "b" IdList records the list "a,b,c".
*/
struct TrigEvent { int a; IdList * b; };

/*
** Disable lookaside memory allocation for objects that might be
** shared across database connections.
*/
static void disableLookaside(Parse *pParse){
  pParse->disableLookaside++;
  pParse->db->lookaside.bDisable++;
}

#line 446 "parse.y"

  /*
  ** For a compound SELECT statement, make sure p->pPrior->pNext==p for
  ** all elements in the list.  And make sure list length does not exceed
  ** SQLITE_LIMIT_COMPOUND_SELECT.
  */
  static void parserDoubleLinkSelect(Parse *pParse, Select *p){
    if( p->pPrior ){
      Select *pNext = 0, *pLoop;
      int mxSelect, cnt = 0;
      for(pLoop=p; pLoop; pNext=pLoop, pLoop=pLoop->pPrior, cnt++){
        pLoop->pNext = pNext;
        pLoop->selFlags |= SF_Compound;
      }
      if( (p->selFlags & SF_MultiValue)==0 && 
        (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 &&
        cnt>mxSelect
      ){
        sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
      }
    }
  }
#line 928 "parse.y"


  /* Construct a new Expr object from a single identifier.  Use the
  ** new Expr to populate pOut.  Set the span of pOut to be the identifier
  ** that created the expression.
  */
  static Expr *tokenExpr(Parse *pParse, int op, Token t){
    Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
    if( p ){
      memset(p, 0, sizeof(Expr));
      p->op = (u8)op;
      p->flags = EP_Leaf;
      p->iAgg = -1;
      p->u.zToken = (char*)&p[1];
      memcpy(p->u.zToken, t.z, t.n);
      p->u.zToken[t.n] = 0;
      if( sqlite3Isquote(p->u.zToken[0]) ){
        if( p->u.zToken[0]=='"' ) p->flags |= EP_DblQuoted;
        sqlite3Dequote(p->u.zToken);
      }
#if SQLITE_MAX_EXPR_DEPTH>0
      p->nHeight = 1;
#endif  
    }
    return p;
  }
#line 1072 "parse.y"

  /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
  ** unary TK_ISNULL or TK_NOTNULL expression. */
  static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
    sqlite3 *db = pParse->db;
    if( pA && pY && pY->op==TK_NULL ){
      pA->op = (u8)op;
      sqlite3ExprDelete(db, pA->pRight);
      pA->pRight = 0;
    }
  }
#line 1287 "parse.y"

  /* Add a single new term to an ExprList that is used to store a
  ** list of identifiers.  Report an error if the ID list contains
  ** a COLLATE clause or an ASC or DESC keyword, except ignore the
  ** error while parsing a legacy schema.
  */
  static ExprList *parserAddExprIdListTerm(
    Parse *pParse,
    ExprList *pPrior,
    Token *pIdToken,
    int hasCollate,
    int sortOrder
  ){
    ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);
    if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)
        && pParse->db->init.busy==0
    ){
      sqlite3ErrorMsg(pParse, "syntax error after column name \"%.*s\"",
                         pIdToken->n, pIdToken->z);
    }
    sqlite3ExprListSetName(pParse, p, pIdToken, 1);
    return p;
  }
#line 174 "parse.c"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    sqlite3ParserTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is sqlite3ParserTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
**    sqlite3ParserARG_PARAM     Code to pass %extra_argument as a subroutine parameter
**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
**    sqlite3ParserCTX_*         As sqlite3ParserARG_ except for %extra_context
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 255
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 84
#define sqlite3ParserTOKENTYPE Token
typedef union {
  int yyinit;
  sqlite3ParserTOKENTYPE yy0;
  const char* yy36;
  TriggerStep* yy47;
  With* yy91;
  struct {int value; int mask;} yy107;
  Expr* yy182;
  Upsert* yy198;
  ExprList* yy232;
  struct TrigEvent yy300;
  Select* yy399;
  SrcList* yy427;
  int yy502;
  IdList* yy510;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE             490
#define YYNRULE              341
#define YYNTOKEN             145
#define YY_MAX_SHIFT         489
#define YY_MIN_SHIFTREDUCE   705
#define YY_MAX_SHIFTREDUCE   1045
#define YY_ERROR_ACTION      1046
#define YY_ACCEPT_ACTION     1047
#define YY_NO_ACTION         1048
#define YY_MIN_REDUCE        1049
#define YY_MAX_REDUCE        1389
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (1657)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   349,   99,   96,  185,   99,   96,  185,  233, 1047,    1,
 /*    10 */     1,  489,    2, 1051,  484,  477,  477,  477,  260,  351,
 /*    20 */   121, 1310, 1120, 1120, 1178, 1115, 1094, 1128,  380,  380,
 /*    30 */   380,  835,  454,  410, 1115,   59,   59, 1357,  425,  836,
 /*    40 */   710,  711,  712,  106,  107,   97, 1023, 1023,  900,  903,
 /*    50 */   892,  892,  104,  104,  105,  105,  105,  105,  346,  238,
 /*    60 */   238,   99,   96,  185,  238,  238,  889,  889,  901,  904,
 /*    70 */   460,  481,  351,   99,   96,  185,  481,  347, 1177,   82,
 /*    80 */   388,  214,  182,   23,  194,  103,  103,  103,  103,  102,
 /*    90 */   102,  101,  101,  101,  100,  381,  106,  107,   97, 1023,
 /*   100 */  1023,  900,  903,  892,  892,  104,  104,  105,  105,  105,
 /*   110 */   105,   10,  385,  484,   24,  484, 1333,  489,    2, 1051,
 /*   120 */   335, 1043,  108,  893,  260,  351,  121,   99,   96,  185,
 /*   130 */   100,  381,  386, 1128,   59,   59,   59,   59,  103,  103,
 /*   140 */   103,  103,  102,  102,  101,  101,  101,  100,  381,  106,
 /*   150 */   107,   97, 1023, 1023,  900,  903,  892,  892,  104,  104,
 /*   160 */   105,  105,  105,  105,  360,  238,  238,  170,  170,  467,
 /*   170 */   455,  467,  464,   67,  381,  329,  169,  481,  351,  343,
 /*   180 */   338,  400, 1044,   68,  101,  101,  101,  100,  381,  393,
 /*   190 */   194,  103,  103,  103,  103,  102,  102,  101,  101,  101,
 /*   200 */   100,  381,  106,  107,   97, 1023, 1023,  900,  903,  892,
 /*   210 */   892,  104,  104,  105,  105,  105,  105,  483,  385,  103,
 /*   220 */   103,  103,  103,  102,  102,  101,  101,  101,  100,  381,
 /*   230 */   268,  351,  946,  946,  422,  296,  102,  102,  101,  101,
 /*   240 */   101,  100,  381,  861,  103,  103,  103,  103,  102,  102,
 /*   250 */   101,  101,  101,  100,  381,  106,  107,   97, 1023, 1023,
 /*   260 */   900,  903,  892,  892,  104,  104,  105,  105,  105,  105,
 /*   270 */   484,  983, 1383,  206, 1353, 1383,  438,  435,  434,  281,
 /*   280 */   396,  269, 1089,  941,  351, 1002,  433,  861,  743,  401,
 /*   290 */   282,   57,   57,  482,  145,  791,  791,  103,  103,  103,
 /*   300 */   103,  102,  102,  101,  101,  101,  100,  381,  106,  107,
 /*   310 */    97, 1023, 1023,  900,  903,  892,  892,  104,  104,  105,
 /*   320 */   105,  105,  105,  281, 1002, 1003, 1004,  206,  879,  319,
 /*   330 */   438,  435,  434,  981,  259,  474,  360,  351, 1118, 1118,
 /*   340 */   433,  736,  379,  378,  872, 1002, 1356,  322,  871,  766,
 /*   350 */   103,  103,  103,  103,  102,  102,  101,  101,  101,  100,
 /*   360 */   381,  106,  107,   97, 1023, 1023,  900,  903,  892,  892,
 /*   370 */   104,  104,  105,  105,  105,  105,  484,  801,  484,  871,
 /*   380 */   871,  873,  401,  282, 1002, 1003, 1004, 1030,  360, 1030,
 /*   390 */   351,  983, 1384,  213,  880, 1384,  145,   59,   59,   59,
 /*   400 */    59, 1002,  244,  103,  103,  103,  103,  102,  102,  101,
 /*   410 */   101,  101,  100,  381,  106,  107,   97, 1023, 1023,  900,
 /*   420 */   903,  892,  892,  104,  104,  105,  105,  105,  105,  274,
 /*   430 */   484,  110,  467,  479,  467,  444,  259,  474,  232,  232,
 /*   440 */  1002, 1003, 1004,  351,  210,  335,  982,  866, 1385,  336,
 /*   450 */   481,   59,   59,  981,  245,  307,  103,  103,  103,  103,
 /*   460 */   102,  102,  101,  101,  101,  100,  381,  106,  107,   97,
 /*   470 */  1023, 1023,  900,  903,  892,  892,  104,  104,  105,  105,
 /*   480 */   105,  105,  453,  459,  484,  408,  377,  259,  474,  271,
 /*   490 */   183,  273,  209,  208,  207,  356,  351,  307,  178,  177,
 /*   500 */   127, 1006, 1098,   14,   14,   43,   43, 1044,  425,  103,
 /*   510 */   103,  103,  103,  102,  102,  101,  101,  101,  100,  381,
 /*   520 */   106,  107,   97, 1023, 1023,  900,  903,  892,  892,  104,
 /*   530 */   104,  105,  105,  105,  105,  294, 1132,  408,  160,  484,
 /*   540 */   408, 1006,  129,  962, 1209,  239,  239,  481,  307,  425,
 /*   550 */  1309, 1097,  351,  235,  243,  272,  820,  481,  963,  425,
 /*   560 */    11,   11,  103,  103,  103,  103,  102,  102,  101,  101,
 /*   570 */   101,  100,  381,  964,  362, 1002,  106,  107,   97, 1023,
 /*   580 */  1023,  900,  903,  892,  892,  104,  104,  105,  105,  105,
 /*   590 */   105, 1275,  161,  126,  777,  289, 1209,  292, 1072,  357,
 /*   600 */  1209, 1127,  476,  357,  778,  425,  247,  425,  351,  248,
 /*   610 */   414,  364,  414,  171, 1002, 1003, 1004,   84,  103,  103,
 /*   620 */   103,  103,  102,  102,  101,  101,  101,  100,  381, 1002,
 /*   630 */   184,  484,  106,  107,   97, 1023, 1023,  900,  903,  892,
 /*   640 */   892,  104,  104,  105,  105,  105,  105, 1123, 1209,  287,
 /*   650 */   484, 1209,   11,   11,  179,  820,  259,  474,  307,  237,
 /*   660 */   182,  351,  321,  365,  414,  308,  367,  366, 1002, 1003,
 /*   670 */  1004,   44,   44,   87,  103,  103,  103,  103,  102,  102,
 /*   680 */   101,  101,  101,  100,  381,  106,  107,   97, 1023, 1023,
 /*   690 */   900,  903,  892,  892,  104,  104,  105,  105,  105,  105,
 /*   700 */   246,  368,  280,  128,   10,  358,  146,  796,  835,  258,
 /*   710 */  1020,   88,  795,   86,  351,  421,  836,  943,  376,  348,
 /*   720 */   191,  943, 1318,  267,  308,  279,  456,  103,  103,  103,
 /*   730 */   103,  102,  102,  101,  101,  101,  100,  381,  106,   95,
 /*   740 */    97, 1023, 1023,  900,  903,  892,  892,  104,  104,  105,
 /*   750 */   105,  105,  105,  420,  249,  238,  238,  238,  238,   79,
 /*   760 */   375,  125,  305,   29,  262,  978,  351,  481,  337,  481,
 /*   770 */   756,  755,  304,  278,  415,   15,   81,  940, 1126,  940,
 /*   780 */   103,  103,  103,  103,  102,  102,  101,  101,  101,  100,
 /*   790 */   381,  107,   97, 1023, 1023,  900,  903,  892,  892,  104,
 /*   800 */   104,  105,  105,  105,  105,  457,  263,  484,  174,  484,
 /*   810 */   238,  238,  863,  407,  402,  216,  216,  351,  409,  193,
 /*   820 */   283,  216,  481,   81,  763,  764,  266,    5,   13,   13,
 /*   830 */    34,   34,  103,  103,  103,  103,  102,  102,  101,  101,
 /*   840 */   101,  100,  381,   97, 1023, 1023,  900,  903,  892,  892,
 /*   850 */   104,  104,  105,  105,  105,  105,   93,  475, 1002,    4,
 /*   860 */   403, 1002,  340,  431, 1002,  297,  212, 1277,   81,  746,
 /*   870 */  1163,  152,  926,  478,  166,  212,  757,  829,  930,  939,
 /*   880 */   216,  939,  858,  103,  103,  103,  103,  102,  102,  101,
 /*   890 */   101,  101,  100,  381,  238,  238,  382, 1002, 1003, 1004,
 /*   900 */  1002, 1003, 1004, 1002, 1003, 1004,  481,  439,  472,  746,
 /*   910 */   105,  105,  105,  105,   98,  758, 1162,  145,  930,  412,
 /*   920 */   879,  406,  793,   81,  395,   89,   90,   91,  105,  105,
 /*   930 */   105,  105, 1323,   92,  484,  382,  486,  485,  240,  275,
 /*   940 */   871,  103,  103,  103,  103,  102,  102,  101,  101,  101,
 /*   950 */   100,  381, 1096,  371,  355,   45,   45,  259,  474,  103,
 /*   960 */   103,  103,  103,  102,  102,  101,  101,  101,  100,  381,
 /*   970 */  1150,  871,  871,  873,  874,   21, 1332,  991,  384,  730,
 /*   980 */   722,  242,  123, 1298,  124,  875,  333,  333,  332,  227,
 /*   990 */   330,  991,  384,  719,  256,  242,  484,  391,  413, 1297,
 /*  1000 */   333,  333,  332,  227,  330,  748,  187,  719,  265,  470,
 /*  1010 */  1279, 1002,  484,  417,  391,  390,  264,   11,   11,  284,
 /*  1020 */   187,  732,  265,   93,  475,  875,    4, 1279, 1281,  419,
 /*  1030 */   264,  369,  416,   11,   11, 1159,  288,  484,  399, 1346,
 /*  1040 */   478,  379,  378,  291,  484,  293,  189,  250,  295, 1027,
 /*  1050 */  1002, 1003, 1004,  190, 1029, 1111,  140,  188,   11,   11,
 /*  1060 */   189,  732, 1028,  382,  923,   46,   46,  190, 1095,  230,
 /*  1070 */   140,  188,  462,   93,  475,  472,    4,  300,  309,  391,
 /*  1080 */   373,    6, 1069,  217,  739,  310, 1030,  879, 1030, 1171,
 /*  1090 */   478,  352, 1279,   90,   91,  800,  259,  474, 1208,  484,
 /*  1100 */    92, 1268,  382,  486,  485,  352, 1002,  871,  879,  426,
 /*  1110 */   259,  474,  172,  382,  238,  238, 1146,  170, 1021,  389,
 /*  1120 */    47,   47, 1157,  739,  872,  472,  481,  469,  871,  350,
 /*  1130 */  1214,   83,  475,  389,    4, 1078, 1071,  879,  871,  871,
 /*  1140 */   873,  874,   21,   90,   91, 1002, 1003, 1004,  478,  251,
 /*  1150 */    92,  251,  382,  486,  485,  443,  370,  871, 1021,  871,
 /*  1160 */   871,  873,  224,  241,  306,  441,  301,  440,  211, 1060,
 /*  1170 */   820,  382,  822,  447,  299, 1059,  484, 1061, 1143,  962,
 /*  1180 */   430,  796,  484,  472, 1340,  312,  795,  465,  871,  871,
 /*  1190 */   873,  874,   21,  314,  963,  879,  316,   59,   59, 1002,
 /*  1200 */     9,   90,   91,   48,   48,  238,  238,  210,   92,  964,
 /*  1210 */   382,  486,  485,  176,  334,  871,  242,  481, 1193,  238,
 /*  1220 */   238,  333,  333,  332,  227,  330,  394,  270,  719,  277,
 /*  1230 */   471,  481,  467,  466,  484,  145,  217, 1201, 1002, 1003,
 /*  1240 */  1004,  187,    3,  265,  184,  445,  871,  871,  873,  874,
 /*  1250 */    21,  264, 1337,  450, 1051,   39,   39,  392,  356,  260,
 /*  1260 */   342,  121,  468,  411,  436,  821,  180, 1094, 1128,  820,
 /*  1270 */   303, 1021, 1272, 1271,  299,  259,  474,  238,  238, 1002,
 /*  1280 */   473,  189,  484,  318,  327,  238,  238,  484,  190,  481,
 /*  1290 */   446,  140,  188, 1343,  238,  238, 1038,  481,  148,  175,
 /*  1300 */   238,  238,  484,   49,   49,  219,  481,  484,   35,   35,
 /*  1310 */  1317, 1021,  481,  484, 1035,  484, 1315,  484, 1002, 1003,
 /*  1320 */  1004,  484,   66,   36,   36,  194,  352,  484,   38,   38,
 /*  1330 */   484,  259,  474,   69,   50,   50,   51,   51,   52,   52,
 /*  1340 */   359,  484,   12,   12,  484, 1198,  484,  158,   53,   53,
 /*  1350 */   405,  112,  112,  385,  389,  484,   26,  484,  143,  484,
 /*  1360 */   150,  484,   54,   54,  397,   40,   40,   55,   55,  484,
 /*  1370 */    79,  484,  153, 1190,  484,  154,   56,   56,   41,   41,
 /*  1380 */    58,   58,  133,  133,  484,  398,  484,  429,  484,  155,
 /*  1390 */   134,  134,  135,  135,  484,   63,   63,  484,  341,  484,
 /*  1400 */   339,  484,  196,  484,  156,   42,   42,  113,  113,   60,
 /*  1410 */    60,  484,  404,  484,   27,  114,  114, 1204,  115,  115,
 /*  1420 */   111,  111,  132,  132,  131,  131, 1266,  418,  484,  162,
 /*  1430 */   484,  200,  119,  119,  118,  118,  484,   74,  424,  484,
 /*  1440 */  1286,  484,  231,  484,  202,  484,  167,  286,  427,  116,
 /*  1450 */   116,  117,  117,  290,  203,  442, 1062,   62,   62,  204,
 /*  1460 */    64,   64,   61,   61,   33,   33,   37,   37,  344,  372,
 /*  1470 */  1114, 1105,  748, 1113,  374, 1112,  254,  458, 1086,  255,
 /*  1480 */   345, 1085,  302, 1084, 1355,   78, 1154,  311, 1104,  449,
 /*  1490 */   452, 1155, 1153,  218,    7,  313,  315,  320, 1152,   85,
 /*  1500 */  1252,  317,  109,   80,  463,  225,  461, 1068,   25,  487,
 /*  1510 */   997,  323,  257,  226,  229,  228, 1136,  324,  325,  326,
 /*  1520 */   488,  136, 1057, 1052, 1302, 1303, 1301,  706, 1300,  137,
 /*  1530 */   122,  138,  383,  173, 1082,  261,  186,  252, 1081,   65,
 /*  1540 */   387,  120,  938,  936,  855,  353,  149, 1079,  139,  151,
 /*  1550 */   192,  780,  195,  276,  952,  157,  141,  361,   70,  363,
 /*  1560 */   859,  159,   71,   72,  142,   73,  955,  354,  147,  197,
 /*  1570 */   198,  951,  130,   16,  199,  285,  216, 1032,  201,  423,
 /*  1580 */   164,  944,  163,   28,  721,  428,  304,  165,  205,  759,
 /*  1590 */    75,  432,  298,   17,   18,  437,   76,  253,  878,  144,
 /*  1600 */   877,  906,   77,  986,   30,  448,  987,   31,  451,  181,
 /*  1610 */   234,  236,  168,  828,  823,   89,  910,  921,   81,  907,
 /*  1620 */   215,  905,  909,  961,  960,   19,  221,   20,  220,   22,
 /*  1630 */    32,  331,  876,  731,   94,  790,  794,    8,  992,  222,
 /*  1640 */   480,  328, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048,
 /*  1650 */   223, 1048, 1048, 1048, 1048, 1348, 1347,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   174,  226,  227,  228,  226,  227,  228,  172,  145,  146,
 /*    10 */   147,  148,  149,  150,  153,  169,  170,  171,  155,   19,
 /*    20 */   157,  246,  192,  193,  177,  181,  182,  164,  169,  170,
 /*    30 */   171,   31,  164,  153,  190,  174,  175,  187,  153,   39,
 /*    40 */     7,    8,    9,   43,   44,   45,   46,   47,   48,   49,
 /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  174,  196,
 /*    60 */   197,  226,  227,  228,  196,  197,   46,   47,   48,   49,
 /*    70 */   209,  208,   19,  226,  227,  228,  208,  174,  177,   26,
 /*    80 */   195,  213,  214,   22,  221,   85,   86,   87,   88,   89,
 /*    90 */    90,   91,   92,   93,   94,   95,   43,   44,   45,   46,
 /*   100 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*   110 */    57,  172,  249,  153,   53,  153,  147,  148,  149,  150,
 /*   120 */    22,   23,   69,  103,  155,   19,  157,  226,  227,  228,
 /*   130 */    94,   95,  247,  164,  174,  175,  174,  175,   85,   86,
 /*   140 */    87,   88,   89,   90,   91,   92,   93,   94,   95,   43,
 /*   150 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   160 */    54,   55,   56,   57,  153,  196,  197,  153,  153,  209,
 /*   170 */   210,  209,  210,   67,   95,  161,  237,  208,   19,  165,
 /*   180 */   165,  242,   84,   24,   91,   92,   93,   94,   95,  223,
 /*   190 */   221,   85,   86,   87,   88,   89,   90,   91,   92,   93,
 /*   200 */    94,   95,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   210 */    51,   52,   53,   54,   55,   56,   57,  153,  249,   85,
 /*   220 */    86,   87,   88,   89,   90,   91,   92,   93,   94,   95,
 /*   230 */   219,   19,  109,  110,  111,   23,   89,   90,   91,   92,
 /*   240 */    93,   94,   95,   73,   85,   86,   87,   88,   89,   90,
 /*   250 */    91,   92,   93,   94,   95,   43,   44,   45,   46,   47,
 /*   260 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
 /*   270 */   153,   22,   23,  101,  173,   26,  104,  105,  106,  109,
 /*   280 */   110,  111,  181,   11,   19,   59,  114,   73,   23,  110,
 /*   290 */   111,  174,  175,  116,   80,  118,  119,   85,   86,   87,
 /*   300 */    88,   89,   90,   91,   92,   93,   94,   95,   43,   44,
 /*   310 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*   320 */    55,   56,   57,  109,   98,   99,  100,  101,   83,  153,
 /*   330 */   104,  105,  106,   84,  120,  121,  153,   19,  192,  193,
 /*   340 */   114,   23,   89,   90,   99,   59,   23,  230,  103,   26,
 /*   350 */    85,   86,   87,   88,   89,   90,   91,   92,   93,   94,
 /*   360 */    95,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   370 */    52,   53,   54,   55,   56,   57,  153,   91,  153,  134,
 /*   380 */   135,  136,  110,  111,   98,   99,  100,  134,  153,  136,
 /*   390 */    19,   22,   23,   26,   23,   26,   80,  174,  175,  174,
 /*   400 */   175,   59,  219,   85,   86,   87,   88,   89,   90,   91,
 /*   410 */    92,   93,   94,   95,   43,   44,   45,   46,   47,   48,
 /*   420 */    49,   50,   51,   52,   53,   54,   55,   56,   57,   16,
 /*   430 */   153,   22,  209,  210,  209,  210,  120,  121,  196,  197,
 /*   440 */    98,   99,  100,   19,   46,   22,   23,   23,  252,  253,
 /*   450 */   208,  174,  175,   84,  219,  153,   85,   86,   87,   88,
 /*   460 */    89,   90,   91,   92,   93,   94,   95,   43,   44,   45,
 /*   470 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   480 */    56,   57,  153,  153,  153,  153,  209,  120,  121,   76,
 /*   490 */   153,   78,  109,  110,  111,   97,   19,  153,   89,   90,
 /*   500 */   198,   59,  183,  174,  175,  174,  175,   84,  153,   85,
 /*   510 */    86,   87,   88,   89,   90,   91,   92,   93,   94,   95,
 /*   520 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   530 */    53,   54,   55,   56,   57,   16,  197,  153,   22,  153,
 /*   540 */   153,   99,  198,   12,  153,  196,  197,  208,  153,  153,
 /*   550 */   195,  183,   19,   23,  222,  142,   26,  208,   27,  153,
 /*   560 */   174,  175,   85,   86,   87,   88,   89,   90,   91,   92,
 /*   570 */    93,   94,   95,   42,  188,   59,   43,   44,   45,   46,
 /*   580 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*   590 */    57,  195,   22,  198,   63,   76,  153,   78,  167,  168,
 /*   600 */   153,  195,  167,  168,   73,  153,  222,  153,   19,  222,
 /*   610 */   153,  220,  153,   24,   98,   99,  100,  140,   85,   86,
 /*   620 */    87,   88,   89,   90,   91,   92,   93,   94,   95,   59,
 /*   630 */   100,  153,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   640 */    51,   52,   53,   54,   55,   56,   57,  195,  153,  195,
 /*   650 */   153,  153,  174,  175,   26,  125,  120,  121,  153,  213,
 /*   660 */   214,   19,  153,  220,  153,  153,  188,  220,   98,   99,
 /*   670 */   100,  174,  175,  140,   85,   86,   87,   88,   89,   90,
 /*   680 */    91,   92,   93,   94,   95,   43,   44,   45,   46,   47,
 /*   690 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
 /*   700 */   243,  189,  243,  198,  172,  250,  251,  117,   31,  201,
 /*   710 */    26,  139,  122,  141,   19,  220,   39,   29,  220,  211,
 /*   720 */    24,   33,  153,  164,  153,  164,   19,   85,   86,   87,
 /*   730 */    88,   89,   90,   91,   92,   93,   94,   95,   43,   44,
 /*   740 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*   750 */    55,   56,   57,   65,  243,  196,  197,  196,  197,  131,
 /*   760 */   189,   22,  103,   24,  153,   23,   19,  208,   26,  208,
 /*   770 */   102,  103,  113,   23,  242,   22,   26,  134,  164,  136,
 /*   780 */    85,   86,   87,   88,   89,   90,   91,   92,   93,   94,
 /*   790 */    95,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   800 */    53,   54,   55,   56,   57,   98,  153,  153,  124,  153,
 /*   810 */   196,  197,   23,   23,   61,   26,   26,   19,   23,  123,
 /*   820 */    23,   26,  208,   26,    7,    8,  153,   22,  174,  175,
 /*   830 */   174,  175,   85,   86,   87,   88,   89,   90,   91,   92,
 /*   840 */    93,   94,   95,   45,   46,   47,   48,   49,   50,   51,
 /*   850 */    52,   53,   54,   55,   56,   57,   19,   20,   59,   22,
 /*   860 */   111,   59,  164,   23,   59,   23,   26,  153,   26,   59,
 /*   870 */   153,   72,   23,   36,   72,   26,   35,   23,   59,  134,
 /*   880 */    26,  136,  133,   85,   86,   87,   88,   89,   90,   91,
 /*   890 */    92,   93,   94,   95,  196,  197,   59,   98,   99,  100,
 /*   900 */    98,   99,  100,   98,   99,  100,  208,   66,   71,   99,
 /*   910 */    54,   55,   56,   57,   58,   74,  153,   80,   99,   19,
 /*   920 */    83,  223,   23,   26,  153,   26,   89,   90,   54,   55,
 /*   930 */    56,   57,  153,   96,  153,   98,   99,  100,   22,  153,
 /*   940 */   103,   85,   86,   87,   88,   89,   90,   91,   92,   93,
 /*   950 */    94,   95,  183,  112,  158,  174,  175,  120,  121,   85,
 /*   960 */    86,   87,   88,   89,   90,   91,   92,   93,   94,   95,
 /*   970 */   215,  134,  135,  136,  137,  138,    0,    1,    2,   23,
 /*   980 */    21,    5,   26,  153,   22,   59,   10,   11,   12,   13,
 /*   990 */    14,    1,    2,   17,  212,    5,  153,  153,   98,  153,
 /*  1000 */    10,   11,   12,   13,   14,  108,   30,   17,   32,  193,
 /*  1010 */   153,   59,  153,  153,  170,  171,   40,  174,  175,  153,
 /*  1020 */    30,   59,   32,   19,   20,   99,   22,  170,  171,  233,
 /*  1030 */    40,  188,  236,  174,  175,  153,  153,  153,   79,  123,
 /*  1040 */    36,   89,   90,  153,  153,  153,   70,  188,  153,   97,
 /*  1050 */    98,   99,  100,   77,  102,  153,   80,   81,  174,  175,
 /*  1060 */    70,   99,  110,   59,  105,  174,  175,   77,  153,  238,
 /*  1070 */    80,   81,  188,   19,   20,   71,   22,  153,  153,  235,
 /*  1080 */    19,   22,  164,   24,   59,  153,  134,   83,  136,  153,
 /*  1090 */    36,  115,  235,   89,   90,   91,  120,  121,  153,  153,
 /*  1100 */    96,  142,   98,   99,  100,  115,   59,  103,   83,  239,
 /*  1110 */   120,  121,  199,   59,  196,  197,  153,  153,   59,  143,
 /*  1120 */   174,  175,  153,   98,   99,   71,  208,  153,  103,  165,
 /*  1130 */   153,   19,   20,  143,   22,  153,  153,   83,  134,  135,
 /*  1140 */   136,  137,  138,   89,   90,   98,   99,  100,   36,  185,
 /*  1150 */    96,  187,   98,   99,  100,   91,   95,  103,   99,  134,
 /*  1160 */   135,  136,  101,  102,  103,  104,  105,  106,  107,  153,
 /*  1170 */    26,   59,  125,  164,  113,  153,  153,  153,  212,   12,
 /*  1180 */    19,  117,  153,   71,  153,  212,  122,  164,  134,  135,
 /*  1190 */   136,  137,  138,  212,   27,   83,  212,  174,  175,   59,
 /*  1200 */   200,   89,   90,  174,  175,  196,  197,   46,   96,   42,
 /*  1210 */    98,   99,  100,  172,  151,  103,    5,  208,  203,  196,
 /*  1220 */   197,   10,   11,   12,   13,   14,  216,  216,   17,  244,
 /*  1230 */    63,  208,  209,  210,  153,   80,   24,  203,   98,   99,
 /*  1240 */   100,   30,   22,   32,  100,  164,  134,  135,  136,  137,
 /*  1250 */   138,   40,  148,  164,  150,  174,  175,  102,   97,  155,
 /*  1260 */   203,  157,  164,  244,  178,  125,  186,  182,  164,  125,
 /*  1270 */   177,   59,  177,  177,  113,  120,  121,  196,  197,   59,
 /*  1280 */   232,   70,  153,  216,  202,  196,  197,  153,   77,  208,
 /*  1290 */   209,   80,   81,  156,  196,  197,   60,  208,  248,  200,
 /*  1300 */   196,  197,  153,  174,  175,  123,  208,  153,  174,  175,
 /*  1310 */   160,   99,  208,  153,   38,  153,  160,  153,   98,   99,
 /*  1320 */   100,  153,  245,  174,  175,  221,  115,  153,  174,  175,
 /*  1330 */   153,  120,  121,  245,  174,  175,  174,  175,  174,  175,
 /*  1340 */   160,  153,  174,  175,  153,  225,  153,   22,  174,  175,
 /*  1350 */    97,  174,  175,  249,  143,  153,  224,  153,   43,  153,
 /*  1360 */   191,  153,  174,  175,   18,  174,  175,  174,  175,  153,
 /*  1370 */   131,  153,  194,  203,  153,  194,  174,  175,  174,  175,
 /*  1380 */   174,  175,  174,  175,  153,  160,  153,   18,  153,  194,
 /*  1390 */   174,  175,  174,  175,  153,  174,  175,  153,  225,  153,
 /*  1400 */   203,  153,  159,  153,  194,  174,  175,  174,  175,  174,
 /*  1410 */   175,  153,  203,  153,  224,  174,  175,  191,  174,  175,
 /*  1420 */   174,  175,  174,  175,  174,  175,  203,  160,  153,  191,
 /*  1430 */   153,  159,  174,  175,  174,  175,  153,  139,   62,  153,
 /*  1440 */   241,  153,  160,  153,  159,  153,   22,  240,  179,  174,
 /*  1450 */   175,  174,  175,  160,  159,   97,  160,  174,  175,  159,
 /*  1460 */   174,  175,  174,  175,  174,  175,  174,  175,  179,   64,
 /*  1470 */   176,  184,  108,  176,   95,  176,  234,  126,  176,  234,
 /*  1480 */   179,  178,  176,  176,  176,   97,  218,  217,  184,  179,
 /*  1490 */   179,  218,  218,  160,   22,  217,  217,  160,  218,  139,
 /*  1500 */   229,  217,  130,  129,  127,   25,  128,  163,   26,  162,
 /*  1510 */    13,  206,  231,  154,    6,  154,  207,  205,  204,  203,
 /*  1520 */   152,  166,  152,  152,  172,  172,  172,    4,  172,  166,
 /*  1530 */   180,  166,    3,   22,  172,  144,   15,  180,  172,  172,
 /*  1540 */    82,   16,   23,   23,  121,  254,  132,  172,  112,  124,
 /*  1550 */    24,   20,  126,   16,    1,  124,  112,   61,   53,   37,
 /*  1560 */   133,  132,   53,   53,  112,   53,   98,  254,  251,   34,
 /*  1570 */   123,    1,    5,   22,   97,  142,   26,   75,  123,   41,
 /*  1580 */    97,   68,   68,   24,   20,   19,  113,   22,  107,   28,
 /*  1590 */    22,   67,   23,   22,   22,   67,   22,   67,   23,   37,
 /*  1600 */    23,   23,   26,   23,   22,   24,   23,   22,   24,  123,
 /*  1610 */    23,   23,   22,   98,  125,   26,   11,   23,   26,   23,
 /*  1620 */    34,   23,   23,   23,   23,   34,   22,   34,   26,   22,
 /*  1630 */    22,   15,   23,   23,   22,  117,   23,   22,    1,  123,
 /*  1640 */    26,   23,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1650 */   123,  255,  255,  255,  255,  123,  123,  255,  255,  255,
 /*  1660 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1670 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1680 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1690 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1700 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1710 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1720 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1730 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1740 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1750 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1760 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1770 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1780 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1790 */   255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 /*  1800 */   255,  255,
};
#define YY_SHIFT_COUNT    (489)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (1637)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */   990,  976, 1211,  837,  837,  316, 1054, 1054, 1054, 1054,
 /*    10 */   214,    0,    0,  106,  642, 1054, 1054, 1054, 1054, 1054,
 /*    20 */  1054, 1054, 1054,  952,  952,  226, 1155,  316,  316,  316,
 /*    30 */   316,  316,  316,   53,  159,  212,  265,  318,  371,  424,
 /*    40 */   477,  533,  589,  642,  642,  642,  642,  642,  642,  642,
 /*    50 */   642,  642,  642,  642,  642,  642,  642,  642,  642,  642,
 /*    60 */   695,  642,  747,  798,  798, 1004, 1054, 1054, 1054, 1054,
 /*    70 */  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
 /*    80 */  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
 /*    90 */  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1112, 1054, 1054,
 /*   100 */  1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054,
 /*   110 */  1054,  856,  874,  874,  874,  874,  874,  134,  147,   93,
 /*   120 */   342,  959, 1161,  253,  253,  342,  367,  367,  367,  367,
 /*   130 */   179,   36,   79, 1657, 1657, 1657, 1061, 1061, 1061,  516,
 /*   140 */   799,  516,  516,  531,  531,  802,  249,  369,  342,  342,
 /*   150 */   342,  342,  342,  342,  342,  342,  342,  342,  342,  342,
 /*   160 */   342,  342,  342,  342,  342,  342,  342,  342,  342,  272,
 /*   170 */   442,  442,  536, 1657, 1657, 1657, 1025,  245,  245,  570,
 /*   180 */   172,  286,  805, 1047, 1140, 1220,  342,  342,  342,  342,
 /*   190 */   342,  342,  342,  342,  170,  342,  342,  342,  342,  342,
 /*   200 */   342,  342,  342,  342,  342,  342,  342,  841,  841,  841,
 /*   210 */   342,  342,  342,  342,  530,  342,  342,  342, 1059,  342,
 /*   220 */   342, 1167,  342,  342,  342,  342,  342,  342,  342,  342,
 /*   230 */   123,  688,  177, 1212, 1212, 1212, 1212, 1144,  177,  177,
 /*   240 */  1064,  409,   33,  628,  707,  707,  900,  628,  628,  900,
 /*   250 */   897,  323,  398,  677,  677,  677,  707,  572,  684,  590,
 /*   260 */   739, 1236, 1182, 1182, 1276, 1276, 1182, 1253, 1325, 1315,
 /*   270 */  1239, 1346, 1346, 1346, 1346, 1182, 1369, 1239, 1239, 1253,
 /*   280 */  1325, 1315, 1315, 1239, 1182, 1369, 1298, 1376, 1182, 1369,
 /*   290 */  1424, 1182, 1369, 1182, 1369, 1424, 1358, 1358, 1358, 1405,
 /*   300 */  1424, 1358, 1364, 1358, 1405, 1358, 1358, 1424, 1379, 1379,
 /*   310 */  1424, 1351, 1388, 1351, 1388, 1351, 1388, 1351, 1388, 1182,
 /*   320 */  1472, 1182, 1360, 1372, 1377, 1374, 1378, 1239, 1480, 1482,
 /*   330 */  1497, 1497, 1508, 1508, 1508, 1657, 1657, 1657, 1657, 1657,
 /*   340 */  1657, 1657, 1657, 1657, 1657, 1657, 1657, 1657, 1657, 1657,
 /*   350 */  1657,   20,  413,   98,  423,  519,  383,  962,  742,   61,
 /*   360 */   696,  749,  750,  753,  789,  790,  795,  797,  840,  842,
 /*   370 */   810,  668,  817,  659,  819,  849,  854,  899,  643,  745,
 /*   380 */   956,  926,  916, 1523, 1529, 1511, 1391, 1521, 1458, 1525,
 /*   390 */  1519, 1520, 1423, 1414, 1436, 1526, 1425, 1531, 1426, 1537,
 /*   400 */  1553, 1431, 1427, 1444, 1496, 1522, 1429, 1505, 1509, 1510,
 /*   410 */  1512, 1452, 1468, 1535, 1447, 1570, 1567, 1551, 1477, 1433,
 /*   420 */  1513, 1550, 1514, 1502, 1538, 1455, 1483, 1559, 1564, 1566,
 /*   430 */  1473, 1481, 1565, 1524, 1568, 1571, 1569, 1572, 1528, 1561,
 /*   440 */  1574, 1530, 1562, 1575, 1577, 1578, 1576, 1580, 1582, 1581,
 /*   450 */  1583, 1585, 1584, 1486, 1587, 1588, 1515, 1586, 1590, 1489,
 /*   460 */  1589, 1591, 1592, 1593, 1594, 1596, 1598, 1589, 1599, 1600,
 /*   470 */  1602, 1601, 1604, 1605, 1607, 1608, 1609, 1610, 1612, 1613,
 /*   480 */  1615, 1614, 1518, 1516, 1527, 1532, 1533, 1618, 1616, 1637,
};
#define YY_REDUCE_COUNT (350)
#define YY_REDUCE_MIN   (-225)
#define YY_REDUCE_MAX   (1375)
static const short yy_reduce_ofst[] = {
 /*     0 */  -137,  -31, 1104, 1023, 1081, -132,  -40,  -38,  223,  225,
 /*    10 */   698, -153,  -99, -225, -165,  386,  478,  843,  859, -139,
 /*    20 */   884,  117,  277,  844,  857,  964,  559,  561,  614,  918,
 /*    30 */  1009, 1089, 1098, -222, -222, -222, -222, -222, -222, -222,
 /*    40 */  -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
 /*    50 */  -222, -222, -222, -222, -222, -222, -222, -222, -222, -222,
 /*    60 */  -222, -222, -222, -222, -222,  329,  331,  497,  654,  656,
 /*    70 */   781,  891,  946, 1029, 1129, 1134, 1149, 1154, 1160, 1162,
 /*    80 */  1164, 1168, 1174, 1177, 1188, 1191, 1193, 1202, 1204, 1206,
 /*    90 */  1208, 1216, 1218, 1221, 1231, 1233, 1235, 1241, 1244, 1246,
 /*   100 */  1248, 1250, 1258, 1260, 1275, 1277, 1283, 1286, 1288, 1290,
 /*   110 */  1292, -222, -222, -222, -222, -222, -222, -222, -222, -222,
 /*   120 */  -115,  796, -156, -154, -141,   14,  242,  349,  242,  349,
 /*   130 */   -61, -222, -222, -222, -222, -222,  101,  101,  101,  332,
 /*   140 */   302,  384,  387, -170,  146,  344,  196,  196,   15,   11,
 /*   150 */   183,  235,  395,  355,  396,  406,  452,  457,  391,  459,
 /*   160 */   443,  447,  511,  495,  454,  512,  505,  571,  498,  532,
 /*   170 */   431,  435,  339,  455,  446,  508, -174, -116,  -97, -120,
 /*   180 */  -150,   64,  176,  330,  337,  509,  569,  611,  653,  673,
 /*   190 */   714,  717,  763,  771,  -34,  779,  786,  830,  846,  860,
 /*   200 */   866,  882,  883,  890,  892,  895,  902,  319,  368,  769,
 /*   210 */   915,  924,  925,  932,  755,  936,  945,  963,  782,  969,
 /*   220 */   974,  816,  977,   64,  982,  983, 1016, 1022, 1024, 1031,
 /*   230 */   870,  831,  913,  966,  973,  981,  984,  755,  913,  913,
 /*   240 */  1000, 1041, 1063, 1015, 1010, 1011,  985, 1034, 1057, 1019,
 /*   250 */  1086, 1080, 1085, 1093, 1095, 1096, 1067, 1048, 1082, 1099,
 /*   260 */  1137, 1050, 1150, 1156, 1077, 1088, 1180, 1120, 1132, 1169,
 /*   270 */  1170, 1178, 1181, 1195, 1210, 1225, 1243, 1197, 1209, 1173,
 /*   280 */  1190, 1226, 1238, 1223, 1267, 1272, 1199, 1207, 1282, 1285,
 /*   290 */  1269, 1293, 1295, 1296, 1300, 1289, 1294, 1297, 1299, 1287,
 /*   300 */  1301, 1302, 1303, 1306, 1304, 1307, 1308, 1310, 1242, 1245,
 /*   310 */  1311, 1268, 1270, 1273, 1278, 1274, 1279, 1280, 1284, 1333,
 /*   320 */  1271, 1337, 1281, 1309, 1305, 1312, 1314, 1316, 1344, 1347,
 /*   330 */  1359, 1361, 1368, 1370, 1371, 1291, 1313, 1317, 1355, 1352,
 /*   340 */  1353, 1354, 1356, 1363, 1350, 1357, 1362, 1366, 1367, 1375,
 /*   350 */  1365,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */  1389, 1389, 1389, 1261, 1046, 1151, 1261, 1261, 1261, 1261,
 /*    10 */  1046, 1181, 1181, 1312, 1077, 1046, 1046, 1046, 1046, 1046,
 /*    20 */  1046, 1260, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*    30 */  1046, 1046, 1046, 1187, 1046, 1046, 1046, 1046, 1262, 1263,
 /*    40 */  1046, 1046, 1046, 1311, 1313, 1197, 1196, 1195, 1194, 1294,
 /*    50 */  1168, 1192, 1185, 1189, 1256, 1257, 1255, 1259, 1262, 1263,
 /*    60 */  1046, 1188, 1226, 1240, 1225, 1046, 1046, 1046, 1046, 1046,
 /*    70 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*    80 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*    90 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   100 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   110 */  1046, 1234, 1239, 1246, 1238, 1235, 1228, 1227, 1229, 1230,
 /*   120 */  1046, 1067, 1116, 1046, 1046, 1046, 1329, 1328, 1046, 1046,
 /*   130 */  1077, 1231, 1232, 1243, 1242, 1241, 1319, 1345, 1344, 1046,
 /*   140 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   150 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   160 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1077,
 /*   170 */  1073, 1073, 1046, 1324, 1151, 1142, 1046, 1046, 1046, 1046,
 /*   180 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1316, 1314, 1046,
 /*   190 */  1276, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   200 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   210 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1147, 1046,
 /*   220 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1339,
 /*   230 */  1046, 1289, 1130, 1147, 1147, 1147, 1147, 1149, 1131, 1129,
 /*   240 */  1141, 1077, 1053, 1191, 1170, 1170, 1378, 1191, 1191, 1378,
 /*   250 */  1091, 1359, 1088, 1181, 1181, 1181, 1170, 1258, 1148, 1141,
 /*   260 */  1046, 1381, 1156, 1156, 1380, 1380, 1156, 1200, 1206, 1119,
 /*   270 */  1191, 1125, 1125, 1125, 1125, 1156, 1064, 1191, 1191, 1200,
 /*   280 */  1206, 1119, 1119, 1191, 1156, 1064, 1293, 1375, 1156, 1064,
 /*   290 */  1269, 1156, 1064, 1156, 1064, 1269, 1117, 1117, 1117, 1106,
 /*   300 */  1269, 1117, 1091, 1117, 1106, 1117, 1117, 1269, 1273, 1273,
 /*   310 */  1269, 1174, 1169, 1174, 1169, 1174, 1169, 1174, 1169, 1156,
 /*   320 */  1264, 1156, 1046, 1186, 1175, 1184, 1182, 1191, 1070, 1109,
 /*   330 */  1342, 1342, 1338, 1338, 1338, 1386, 1386, 1324, 1354, 1077,
 /*   340 */  1077, 1077, 1077, 1354, 1093, 1093, 1077, 1077, 1077, 1077,
 /*   350 */  1354, 1046, 1046, 1046, 1046, 1046, 1046, 1349, 1046, 1278,
 /*   360 */  1160, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   370 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   380 */  1046, 1046, 1211, 1046, 1049, 1321, 1046, 1046, 1320, 1046,
 /*   390 */  1046, 1046, 1046, 1046, 1046, 1161, 1046, 1046, 1046, 1046,
 /*   400 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   410 */  1046, 1046, 1046, 1046, 1377, 1046, 1046, 1046, 1046, 1046,
 /*   420 */  1046, 1292, 1291, 1046, 1046, 1158, 1046, 1046, 1046, 1046,
 /*   430 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   440 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   450 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   460 */  1183, 1046, 1176, 1046, 1046, 1046, 1046, 1368, 1046, 1046,
 /*   470 */  1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
 /*   480 */  1046, 1363, 1133, 1213, 1046, 1212, 1216, 1046, 1058, 1046,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
    0,  /*          $ => nothing */
    0,  /*       SEMI => nothing */
   59,  /*    EXPLAIN => ID */
   59,  /*      QUERY => ID */
   59,  /*       PLAN => ID */
   59,  /*      BEGIN => ID */
    0,  /* TRANSACTION => nothing */
   59,  /*   DEFERRED => ID */
   59,  /*  IMMEDIATE => ID */
   59,  /*  EXCLUSIVE => ID */
    0,  /*     COMMIT => nothing */
   59,  /*        END => ID */
   59,  /*   ROLLBACK => ID */
   59,  /*  SAVEPOINT => ID */
   59,  /*    RELEASE => ID */
    0,  /*         TO => nothing */
    0,  /*      TABLE => nothing */
    0,  /*     CREATE => nothing */
   59,  /*         IF => ID */
    0,  /*        NOT => nothing */
    0,  /*     EXISTS => nothing */
   59,  /*       TEMP => ID */
    0,  /*         LP => nothing */
    0,  /*         RP => nothing */
    0,  /*         AS => nothing */
   59,  /*    WITHOUT => ID */
    0,  /*      COMMA => nothing */
   59,  /*      ABORT => ID */
   59,  /*     ACTION => ID */
   59,  /*      AFTER => ID */
   59,  /*    ANALYZE => ID */
   59,  /*        ASC => ID */
   59,  /*     ATTACH => ID */
   59,  /*     BEFORE => ID */
   59,  /*         BY => ID */
   59,  /*    CASCADE => ID */
   59,  /*       CAST => ID */
   59,  /*   CONFLICT => ID */
   59,  /*   DATABASE => ID */
   59,  /*       DESC => ID */
   59,  /*     DETACH => ID */
   59,  /*       EACH => ID */
   59,  /*       FAIL => ID */
    0,  /*         OR => nothing */
    0,  /*        AND => nothing */
    0,  /*         IS => nothing */
   59,  /*      MATCH => ID */
   59,  /*    LIKE_KW => ID */
    0,  /*    BETWEEN => nothing */
    0,  /*         IN => nothing */
    0,  /*     ISNULL => nothing */
    0,  /*    NOTNULL => nothing */
    0,  /*         NE => nothing */
    0,  /*         EQ => nothing */
    0,  /*         GT => nothing */
    0,  /*         LE => nothing */
    0,  /*         LT => nothing */
    0,  /*         GE => nothing */
    0,  /*     ESCAPE => nothing */
    0,  /*         ID => nothing */
   59,  /*   COLUMNKW => ID */
   59,  /*         DO => ID */
   59,  /*        FOR => ID */
   59,  /*     IGNORE => ID */
   59,  /*  INITIALLY => ID */
   59,  /*    INSTEAD => ID */
   59,  /*         NO => ID */
   59,  /*        KEY => ID */
   59,  /*         OF => ID */
   59,  /*     OFFSET => ID */
   59,  /*     PRAGMA => ID */
   59,  /*      RAISE => ID */
   59,  /*  RECURSIVE => ID */
   59,  /*    REPLACE => ID */
   59,  /*   RESTRICT => ID */
   59,  /*        ROW => ID */
   59,  /*    TRIGGER => ID */
   59,  /*     VACUUM => ID */
   59,  /*       VIEW => ID */
   59,  /*    VIRTUAL => ID */
   59,  /*       WITH => ID */
   59,  /*    REINDEX => ID */
   59,  /*     RENAME => ID */
   59,  /*   CTIME_KW => ID */
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
** parser's stack.  Information stored includes:
**
**   +  The state number for the parser at this level of the stack.
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
  sqlite3ParserCTX_SDECL                /* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message.  Tracing is turned off
** by making either argument NULL 
**
** Inputs:
** <ul>
** <li> A FILE* to which trace output should be written.
**      If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "SEMI",
  /*    2 */ "EXPLAIN",
  /*    3 */ "QUERY",
  /*    4 */ "PLAN",
  /*    5 */ "BEGIN",
  /*    6 */ "TRANSACTION",
  /*    7 */ "DEFERRED",
  /*    8 */ "IMMEDIATE",
  /*    9 */ "EXCLUSIVE",
  /*   10 */ "COMMIT",
  /*   11 */ "END",
  /*   12 */ "ROLLBACK",
  /*   13 */ "SAVEPOINT",
  /*   14 */ "RELEASE",
  /*   15 */ "TO",
  /*   16 */ "TABLE",
  /*   17 */ "CREATE",
  /*   18 */ "IF",
  /*   19 */ "NOT",
  /*   20 */ "EXISTS",
  /*   21 */ "TEMP",
  /*   22 */ "LP",
  /*   23 */ "RP",
  /*   24 */ "AS",
  /*   25 */ "WITHOUT",
  /*   26 */ "COMMA",
  /*   27 */ "ABORT",
  /*   28 */ "ACTION",
  /*   29 */ "AFTER",
  /*   30 */ "ANALYZE",
  /*   31 */ "ASC",
  /*   32 */ "ATTACH",
  /*   33 */ "BEFORE",
  /*   34 */ "BY",
  /*   35 */ "CASCADE",
  /*   36 */ "CAST",
  /*   37 */ "CONFLICT",
  /*   38 */ "DATABASE",
  /*   39 */ "DESC",
  /*   40 */ "DETACH",
  /*   41 */ "EACH",
  /*   42 */ "FAIL",
  /*   43 */ "OR",
  /*   44 */ "AND",
  /*   45 */ "IS",
  /*   46 */ "MATCH",
  /*   47 */ "LIKE_KW",
  /*   48 */ "BETWEEN",
  /*   49 */ "IN",
  /*   50 */ "ISNULL",
  /*   51 */ "NOTNULL",
  /*   52 */ "NE",
  /*   53 */ "EQ",
  /*   54 */ "GT",
  /*   55 */ "LE",
  /*   56 */ "LT",
  /*   57 */ "GE",
  /*   58 */ "ESCAPE",
  /*   59 */ "ID",
  /*   60 */ "COLUMNKW",
  /*   61 */ "DO",
  /*   62 */ "FOR",
  /*   63 */ "IGNORE",
  /*   64 */ "INITIALLY",
  /*   65 */ "INSTEAD",
  /*   66 */ "NO",
  /*   67 */ "KEY",
  /*   68 */ "OF",
  /*   69 */ "OFFSET",
  /*   70 */ "PRAGMA",
  /*   71 */ "RAISE",
  /*   72 */ "RECURSIVE",
  /*   73 */ "REPLACE",
  /*   74 */ "RESTRICT",
  /*   75 */ "ROW",
  /*   76 */ "TRIGGER",
  /*   77 */ "VACUUM",
  /*   78 */ "VIEW",
  /*   79 */ "VIRTUAL",
  /*   80 */ "WITH",
  /*   81 */ "REINDEX",
  /*   82 */ "RENAME",
  /*   83 */ "CTIME_KW",
  /*   84 */ "ANY",
  /*   85 */ "BITAND",
  /*   86 */ "BITOR",
  /*   87 */ "LSHIFT",
  /*   88 */ "RSHIFT",
  /*   89 */ "PLUS",
  /*   90 */ "MINUS",
  /*   91 */ "STAR",
  /*   92 */ "SLASH",
  /*   93 */ "REM",
  /*   94 */ "CONCAT",
  /*   95 */ "COLLATE",
  /*   96 */ "BITNOT",
  /*   97 */ "ON",
  /*   98 */ "INDEXED",
  /*   99 */ "STRING",
  /*  100 */ "JOIN_KW",
  /*  101 */ "CONSTRAINT",
  /*  102 */ "DEFAULT",
  /*  103 */ "NULL",
  /*  104 */ "PRIMARY",
  /*  105 */ "UNIQUE",
  /*  106 */ "CHECK",
  /*  107 */ "REFERENCES",
  /*  108 */ "AUTOINCR",
  /*  109 */ "INSERT",
  /*  110 */ "DELETE",
  /*  111 */ "UPDATE",
  /*  112 */ "SET",
  /*  113 */ "DEFERRABLE",
  /*  114 */ "FOREIGN",
  /*  115 */ "DROP",
  /*  116 */ "UNION",
  /*  117 */ "ALL",
  /*  118 */ "EXCEPT",
  /*  119 */ "INTERSECT",
  /*  120 */ "SELECT",
  /*  121 */ "VALUES",
  /*  122 */ "DISTINCT",
  /*  123 */ "DOT",
  /*  124 */ "FROM",
  /*  125 */ "JOIN",
  /*  126 */ "USING",
  /*  127 */ "ORDER",
  /*  128 */ "GROUP",
  /*  129 */ "HAVING",
  /*  130 */ "LIMIT",
  /*  131 */ "WHERE",
  /*  132 */ "INTO",
  /*  133 */ "NOTHING",
  /*  134 */ "FLOAT",
  /*  135 */ "BLOB",
  /*  136 */ "INTEGER",
  /*  137 */ "VARIABLE",
  /*  138 */ "CASE",
  /*  139 */ "WHEN",
  /*  140 */ "THEN",
  /*  141 */ "ELSE",
  /*  142 */ "INDEX",
  /*  143 */ "ALTER",
  /*  144 */ "ADD",
  /*  145 */ "input",
  /*  146 */ "cmdlist",
  /*  147 */ "ecmd",
  /*  148 */ "cmdx",
  /*  149 */ "explain",
  /*  150 */ "cmd",
  /*  151 */ "transtype",
  /*  152 */ "trans_opt",
  /*  153 */ "nm",
  /*  154 */ "savepoint_opt",
  /*  155 */ "create_table",
  /*  156 */ "create_table_args",
  /*  157 */ "createkw",
  /*  158 */ "temp",
  /*  159 */ "ifnotexists",
  /*  160 */ "dbnm",
  /*  161 */ "columnlist",
  /*  162 */ "conslist_opt",
  /*  163 */ "table_options",
  /*  164 */ "select",
  /*  165 */ "columnname",
  /*  166 */ "carglist",
  /*  167 */ "typetoken",
  /*  168 */ "typename",
  /*  169 */ "signed",
  /*  170 */ "plus_num",
  /*  171 */ "minus_num",
  /*  172 */ "scanpt",
  /*  173 */ "ccons",
  /*  174 */ "term",
  /*  175 */ "expr",
  /*  176 */ "onconf",
  /*  177 */ "sortorder",
  /*  178 */ "autoinc",
  /*  179 */ "eidlist_opt",
  /*  180 */ "refargs",
  /*  181 */ "defer_subclause",
  /*  182 */ "refarg",
  /*  183 */ "refact",
  /*  184 */ "init_deferred_pred_opt",
  /*  185 */ "conslist",
  /*  186 */ "tconscomma",
  /*  187 */ "tcons",
  /*  188 */ "sortlist",
  /*  189 */ "eidlist",
  /*  190 */ "defer_subclause_opt",
  /*  191 */ "orconf",
  /*  192 */ "resolvetype",
  /*  193 */ "raisetype",
  /*  194 */ "ifexists",
  /*  195 */ "fullname",
  /*  196 */ "selectnowith",
  /*  197 */ "oneselect",
  /*  198 */ "wqlist",
  /*  199 */ "multiselect_op",
  /*  200 */ "distinct",
  /*  201 */ "selcollist",
  /*  202 */ "from",
  /*  203 */ "where_opt",
  /*  204 */ "groupby_opt",
  /*  205 */ "having_opt",
  /*  206 */ "orderby_opt",
  /*  207 */ "limit_opt",
  /*  208 */ "values",
  /*  209 */ "nexprlist",
  /*  210 */ "exprlist",
  /*  211 */ "sclp",
  /*  212 */ "as",
  /*  213 */ "seltablist",
  /*  214 */ "stl_prefix",
  /*  215 */ "joinop",
  /*  216 */ "indexed_opt",
  /*  217 */ "on_opt",
  /*  218 */ "using_opt",
  /*  219 */ "xfullname",
  /*  220 */ "idlist",
  /*  221 */ "with",
  /*  222 */ "setlist",
  /*  223 */ "insert_cmd",
  /*  224 */ "idlist_opt",
  /*  225 */ "upsert",
  /*  226 */ "likeop",
  /*  227 */ "between_op",
  /*  228 */ "in_op",
  /*  229 */ "paren_exprlist",
  /*  230 */ "case_operand",
  /*  231 */ "case_exprlist",
  /*  232 */ "case_else",
  /*  233 */ "uniqueflag",
  /*  234 */ "collate",
  /*  235 */ "nmnum",
  /*  236 */ "trigger_decl",
  /*  237 */ "trigger_cmd_list",
  /*  238 */ "trigger_time",
  /*  239 */ "trigger_event",
  /*  240 */ "foreach_clause",
  /*  241 */ "when_clause",
  /*  242 */ "trigger_cmd",
  /*  243 */ "trnm",
  /*  244 */ "tridxby",
  /*  245 */ "database_kw_opt",
  /*  246 */ "key_opt",
  /*  247 */ "add_column_fullname",
  /*  248 */ "kwcolumn_opt",
  /*  249 */ "create_vtab",
  /*  250 */ "vtabarglist",
  /*  251 */ "vtabarg",
  /*  252 */ "vtabargtoken",
  /*  253 */ "lp",
  /*  254 */ "anylist",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "explain ::= EXPLAIN",
 /*   1 */ "explain ::= EXPLAIN QUERY PLAN",
 /*   2 */ "cmdx ::= cmd",
 /*   3 */ "cmd ::= BEGIN transtype trans_opt",
 /*   4 */ "transtype ::=",
 /*   5 */ "transtype ::= DEFERRED",
 /*   6 */ "transtype ::= IMMEDIATE",
 /*   7 */ "transtype ::= EXCLUSIVE",
 /*   8 */ "cmd ::= COMMIT|END trans_opt",
 /*   9 */ "cmd ::= ROLLBACK trans_opt",
 /*  10 */ "cmd ::= SAVEPOINT nm",
 /*  11 */ "cmd ::= RELEASE savepoint_opt nm",
 /*  12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
 /*  13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
 /*  14 */ "createkw ::= CREATE",
 /*  15 */ "ifnotexists ::=",
 /*  16 */ "ifnotexists ::= IF NOT EXISTS",
 /*  17 */ "temp ::= TEMP",
 /*  18 */ "temp ::=",
 /*  19 */ "create_table_args ::= LP columnlist conslist_opt RP table_options",
 /*  20 */ "create_table_args ::= AS select",
 /*  21 */ "table_options ::=",
 /*  22 */ "table_options ::= WITHOUT nm",
 /*  23 */ "columnname ::= nm typetoken",
 /*  24 */ "typetoken ::=",
 /*  25 */ "typetoken ::= typename LP signed RP",
 /*  26 */ "typetoken ::= typename LP signed COMMA signed RP",
 /*  27 */ "typename ::= typename ID|STRING",
 /*  28 */ "scanpt ::=",
 /*  29 */ "ccons ::= CONSTRAINT nm",
 /*  30 */ "ccons ::= DEFAULT scanpt term scanpt",
 /*  31 */ "ccons ::= DEFAULT LP expr RP",
 /*  32 */ "ccons ::= DEFAULT PLUS term scanpt",
 /*  33 */ "ccons ::= DEFAULT MINUS term scanpt",
 /*  34 */ "ccons ::= DEFAULT scanpt ID|INDEXED",
 /*  35 */ "ccons ::= NOT NULL onconf",
 /*  36 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
 /*  37 */ "ccons ::= UNIQUE onconf",
 /*  38 */ "ccons ::= CHECK LP expr RP",
 /*  39 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
 /*  40 */ "ccons ::= defer_subclause",
 /*  41 */ "ccons ::= COLLATE ID|STRING",
 /*  42 */ "autoinc ::=",
 /*  43 */ "autoinc ::= AUTOINCR",
 /*  44 */ "refargs ::=",
 /*  45 */ "refargs ::= refargs refarg",
 /*  46 */ "refarg ::= MATCH nm",
 /*  47 */ "refarg ::= ON INSERT refact",
 /*  48 */ "refarg ::= ON DELETE refact",
 /*  49 */ "refarg ::= ON UPDATE refact",
 /*  50 */ "refact ::= SET NULL",
 /*  51 */ "refact ::= SET DEFAULT",
 /*  52 */ "refact ::= CASCADE",
 /*  53 */ "refact ::= RESTRICT",
 /*  54 */ "refact ::= NO ACTION",
 /*  55 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
 /*  56 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
 /*  57 */ "init_deferred_pred_opt ::=",
 /*  58 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
 /*  59 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
 /*  60 */ "conslist_opt ::=",
 /*  61 */ "tconscomma ::= COMMA",
 /*  62 */ "tcons ::= CONSTRAINT nm",
 /*  63 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
 /*  64 */ "tcons ::= UNIQUE LP sortlist RP onconf",
 /*  65 */ "tcons ::= CHECK LP expr RP onconf",
 /*  66 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
 /*  67 */ "defer_subclause_opt ::=",
 /*  68 */ "onconf ::=",
 /*  69 */ "onconf ::= ON CONFLICT resolvetype",
 /*  70 */ "orconf ::=",
 /*  71 */ "orconf ::= OR resolvetype",
 /*  72 */ "resolvetype ::= IGNORE",
 /*  73 */ "resolvetype ::= REPLACE",
 /*  74 */ "cmd ::= DROP TABLE ifexists fullname",
 /*  75 */ "ifexists ::= IF EXISTS",
 /*  76 */ "ifexists ::=",
 /*  77 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
 /*  78 */ "cmd ::= DROP VIEW ifexists fullname",
 /*  79 */ "cmd ::= select",
 /*  80 */ "select ::= WITH wqlist selectnowith",
 /*  81 */ "select ::= WITH RECURSIVE wqlist selectnowith",
 /*  82 */ "select ::= selectnowith",
 /*  83 */ "selectnowith ::= selectnowith multiselect_op oneselect",
 /*  84 */ "multiselect_op ::= UNION",
 /*  85 */ "multiselect_op ::= UNION ALL",
 /*  86 */ "multiselect_op ::= EXCEPT|INTERSECT",
 /*  87 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
 /*  88 */ "values ::= VALUES LP nexprlist RP",
 /*  89 */ "values ::= values COMMA LP exprlist RP",
 /*  90 */ "distinct ::= DISTINCT",
 /*  91 */ "distinct ::= ALL",
 /*  92 */ "distinct ::=",
 /*  93 */ "sclp ::=",
 /*  94 */ "selcollist ::= sclp scanpt expr scanpt as",
 /*  95 */ "selcollist ::= sclp scanpt STAR",
 /*  96 */ "selcollist ::= sclp scanpt nm DOT STAR",
 /*  97 */ "as ::= AS nm",
 /*  98 */ "as ::=",
 /*  99 */ "from ::=",
 /* 100 */ "from ::= FROM seltablist",
 /* 101 */ "stl_prefix ::= seltablist joinop",
 /* 102 */ "stl_prefix ::=",
 /* 103 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
 /* 104 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
 /* 105 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
 /* 106 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
 /* 107 */ "dbnm ::=",
 /* 108 */ "dbnm ::= DOT nm",
 /* 109 */ "fullname ::= nm",
 /* 110 */ "fullname ::= nm DOT nm",
 /* 111 */ "xfullname ::= nm",
 /* 112 */ "xfullname ::= nm DOT nm",
 /* 113 */ "xfullname ::= nm DOT nm AS nm",
 /* 114 */ "xfullname ::= nm AS nm",
 /* 115 */ "joinop ::= COMMA|JOIN",
 /* 116 */ "joinop ::= JOIN_KW JOIN",
 /* 117 */ "joinop ::= JOIN_KW nm JOIN",
 /* 118 */ "joinop ::= JOIN_KW nm nm JOIN",
 /* 119 */ "on_opt ::= ON expr",
 /* 120 */ "on_opt ::=",
 /* 121 */ "indexed_opt ::=",
 /* 122 */ "indexed_opt ::= INDEXED BY nm",
 /* 123 */ "indexed_opt ::= NOT INDEXED",
 /* 124 */ "using_opt ::= USING LP idlist RP",
 /* 125 */ "using_opt ::=",
 /* 126 */ "orderby_opt ::=",
 /* 127 */ "orderby_opt ::= ORDER BY sortlist",
 /* 128 */ "sortlist ::= sortlist COMMA expr sortorder",
 /* 129 */ "sortlist ::= expr sortorder",
 /* 130 */ "sortorder ::= ASC",
 /* 131 */ "sortorder ::= DESC",
 /* 132 */ "sortorder ::=",
 /* 133 */ "groupby_opt ::=",
 /* 134 */ "groupby_opt ::= GROUP BY nexprlist",
 /* 135 */ "having_opt ::=",
 /* 136 */ "having_opt ::= HAVING expr",
 /* 137 */ "limit_opt ::=",
 /* 138 */ "limit_opt ::= LIMIT expr",
 /* 139 */ "limit_opt ::= LIMIT expr OFFSET expr",
 /* 140 */ "limit_opt ::= LIMIT expr COMMA expr",
 /* 141 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
 /* 142 */ "where_opt ::=",
 /* 143 */ "where_opt ::= WHERE expr",
 /* 144 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
 /* 145 */ "setlist ::= setlist COMMA nm EQ expr",
 /* 146 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
 /* 147 */ "setlist ::= nm EQ expr",
 /* 148 */ "setlist ::= LP idlist RP EQ expr",
 /* 149 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
 /* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES",
 /* 151 */ "upsert ::=",
 /* 152 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt",
 /* 153 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING",
 /* 154 */ "upsert ::= ON CONFLICT DO NOTHING",
 /* 155 */ "insert_cmd ::= INSERT orconf",
 /* 156 */ "insert_cmd ::= REPLACE",
 /* 157 */ "idlist_opt ::=",
 /* 158 */ "idlist_opt ::= LP idlist RP",
 /* 159 */ "idlist ::= idlist COMMA nm",
 /* 160 */ "idlist ::= nm",
 /* 161 */ "expr ::= LP expr RP",
 /* 162 */ "expr ::= ID|INDEXED",
 /* 163 */ "expr ::= JOIN_KW",
 /* 164 */ "expr ::= nm DOT nm",
 /* 165 */ "expr ::= nm DOT nm DOT nm",
 /* 166 */ "term ::= NULL|FLOAT|BLOB",
 /* 167 */ "term ::= STRING",
 /* 168 */ "term ::= INTEGER",
 /* 169 */ "expr ::= VARIABLE",
 /* 170 */ "expr ::= expr COLLATE ID|STRING",
 /* 171 */ "expr ::= CAST LP expr AS typetoken RP",
 /* 172 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
 /* 173 */ "expr ::= ID|INDEXED LP STAR RP",
 /* 174 */ "term ::= CTIME_KW",
 /* 175 */ "expr ::= LP nexprlist COMMA expr RP",
 /* 176 */ "expr ::= expr AND expr",
 /* 177 */ "expr ::= expr OR expr",
 /* 178 */ "expr ::= expr LT|GT|GE|LE expr",
 /* 179 */ "expr ::= expr EQ|NE expr",
 /* 180 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
 /* 181 */ "expr ::= expr PLUS|MINUS expr",
 /* 182 */ "expr ::= expr STAR|SLASH|REM expr",
 /* 183 */ "expr ::= expr CONCAT expr",
 /* 184 */ "likeop ::= NOT LIKE_KW|MATCH",
 /* 185 */ "expr ::= expr likeop expr",
 /* 186 */ "expr ::= expr likeop expr ESCAPE expr",
 /* 187 */ "expr ::= expr ISNULL|NOTNULL",
 /* 188 */ "expr ::= expr NOT NULL",
 /* 189 */ "expr ::= expr IS expr",
 /* 190 */ "expr ::= expr IS NOT expr",
 /* 191 */ "expr ::= NOT expr",
 /* 192 */ "expr ::= BITNOT expr",
 /* 193 */ "expr ::= MINUS expr",
 /* 194 */ "expr ::= PLUS expr",
 /* 195 */ "between_op ::= BETWEEN",
 /* 196 */ "between_op ::= NOT BETWEEN",
 /* 197 */ "expr ::= expr between_op expr AND expr",
 /* 198 */ "in_op ::= IN",
 /* 199 */ "in_op ::= NOT IN",
 /* 200 */ "expr ::= expr in_op LP exprlist RP",
 /* 201 */ "expr ::= LP select RP",
 /* 202 */ "expr ::= expr in_op LP select RP",
 /* 203 */ "expr ::= expr in_op nm dbnm paren_exprlist",
 /* 204 */ "expr ::= EXISTS LP select RP",
 /* 205 */ "expr ::= CASE case_operand case_exprlist case_else END",
 /* 206 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
 /* 207 */ "case_exprlist ::= WHEN expr THEN expr",
 /* 208 */ "case_else ::= ELSE expr",
 /* 209 */ "case_else ::=",
 /* 210 */ "case_operand ::= expr",
 /* 211 */ "case_operand ::=",
 /* 212 */ "exprlist ::=",
 /* 213 */ "nexprlist ::= nexprlist COMMA expr",
 /* 214 */ "nexprlist ::= expr",
 /* 215 */ "paren_exprlist ::=",
 /* 216 */ "paren_exprlist ::= LP exprlist RP",
 /* 217 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
 /* 218 */ "uniqueflag ::= UNIQUE",
 /* 219 */ "uniqueflag ::=",
 /* 220 */ "eidlist_opt ::=",
 /* 221 */ "eidlist_opt ::= LP eidlist RP",
 /* 222 */ "eidlist ::= eidlist COMMA nm collate sortorder",
 /* 223 */ "eidlist ::= nm collate sortorder",
 /* 224 */ "collate ::=",
 /* 225 */ "collate ::= COLLATE ID|STRING",
 /* 226 */ "cmd ::= DROP INDEX ifexists fullname",
 /* 227 */ "cmd ::= VACUUM",
 /* 228 */ "cmd ::= VACUUM nm",
 /* 229 */ "cmd ::= PRAGMA nm dbnm",
 /* 230 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
 /* 231 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
 /* 232 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
 /* 233 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
 /* 234 */ "plus_num ::= PLUS INTEGER|FLOAT",
 /* 235 */ "minus_num ::= MINUS INTEGER|FLOAT",
 /* 236 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
 /* 237 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
 /* 238 */ "trigger_time ::= BEFORE|AFTER",
 /* 239 */ "trigger_time ::= INSTEAD OF",
 /* 240 */ "trigger_time ::=",
 /* 241 */ "trigger_event ::= DELETE|INSERT",
 /* 242 */ "trigger_event ::= UPDATE",
 /* 243 */ "trigger_event ::= UPDATE OF idlist",
 /* 244 */ "when_clause ::=",
 /* 245 */ "when_clause ::= WHEN expr",
 /* 246 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
 /* 247 */ "trigger_cmd_list ::= trigger_cmd SEMI",
 /* 248 */ "trnm ::= nm DOT nm",
 /* 249 */ "tridxby ::= INDEXED BY nm",
 /* 250 */ "tridxby ::= NOT INDEXED",
 /* 251 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt",
 /* 252 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
 /* 253 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
 /* 254 */ "trigger_cmd ::= scanpt select scanpt",
 /* 255 */ "expr ::= RAISE LP IGNORE RP",
 /* 256 */ "expr ::= RAISE LP raisetype COMMA nm RP",
 /* 257 */ "raisetype ::= ROLLBACK",
 /* 258 */ "raisetype ::= ABORT",
 /* 259 */ "raisetype ::= FAIL",
 /* 260 */ "cmd ::= DROP TRIGGER ifexists fullname",
 /* 261 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
 /* 262 */ "cmd ::= DETACH database_kw_opt expr",
 /* 263 */ "key_opt ::=",
 /* 264 */ "key_opt ::= KEY expr",
 /* 265 */ "cmd ::= REINDEX",
 /* 266 */ "cmd ::= REINDEX nm dbnm",
 /* 267 */ "cmd ::= ANALYZE",
 /* 268 */ "cmd ::= ANALYZE nm dbnm",
 /* 269 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
 /* 270 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
 /* 271 */ "add_column_fullname ::= fullname",
 /* 272 */ "cmd ::= create_vtab",
 /* 273 */ "cmd ::= create_vtab LP vtabarglist RP",
 /* 274 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
 /* 275 */ "vtabarg ::=",
 /* 276 */ "vtabargtoken ::= ANY",
 /* 277 */ "vtabargtoken ::= lp anylist RP",
 /* 278 */ "lp ::= LP",
 /* 279 */ "with ::= WITH wqlist",
 /* 280 */ "with ::= WITH RECURSIVE wqlist",
 /* 281 */ "wqlist ::= nm eidlist_opt AS LP select RP",
 /* 282 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
 /* 283 */ "input ::= cmdlist",
 /* 284 */ "cmdlist ::= cmdlist ecmd",
 /* 285 */ "cmdlist ::= ecmd",
 /* 286 */ "ecmd ::= SEMI",
 /* 287 */ "ecmd ::= cmdx SEMI",
 /* 288 */ "ecmd ::= explain cmdx",
 /* 289 */ "trans_opt ::=",
 /* 290 */ "trans_opt ::= TRANSACTION",
 /* 291 */ "trans_opt ::= TRANSACTION nm",
 /* 292 */ "savepoint_opt ::= SAVEPOINT",
 /* 293 */ "savepoint_opt ::=",
 /* 294 */ "cmd ::= create_table create_table_args",
 /* 295 */ "columnlist ::= columnlist COMMA columnname carglist",
 /* 296 */ "columnlist ::= columnname carglist",
 /* 297 */ "nm ::= ID|INDEXED",
 /* 298 */ "nm ::= STRING",
 /* 299 */ "nm ::= JOIN_KW",
 /* 300 */ "typetoken ::= typename",
 /* 301 */ "typename ::= ID|STRING",
 /* 302 */ "signed ::= plus_num",
 /* 303 */ "signed ::= minus_num",
 /* 304 */ "carglist ::= carglist ccons",
 /* 305 */ "carglist ::=",
 /* 306 */ "ccons ::= NULL onconf",
 /* 307 */ "conslist_opt ::= COMMA conslist",
 /* 308 */ "conslist ::= conslist tconscomma tcons",
 /* 309 */ "conslist ::= tcons",
 /* 310 */ "tconscomma ::=",
 /* 311 */ "defer_subclause_opt ::= defer_subclause",
 /* 312 */ "resolvetype ::= raisetype",
 /* 313 */ "selectnowith ::= oneselect",
 /* 314 */ "oneselect ::= values",
 /* 315 */ "sclp ::= selcollist COMMA",
 /* 316 */ "as ::= ID|STRING",
 /* 317 */ "expr ::= term",
 /* 318 */ "likeop ::= LIKE_KW|MATCH",
 /* 319 */ "exprlist ::= nexprlist",
 /* 320 */ "nmnum ::= plus_num",
 /* 321 */ "nmnum ::= nm",
 /* 322 */ "nmnum ::= ON",
 /* 323 */ "nmnum ::= DELETE",
 /* 324 */ "nmnum ::= DEFAULT",
 /* 325 */ "plus_num ::= INTEGER|FLOAT",
 /* 326 */ "foreach_clause ::=",
 /* 327 */ "foreach_clause ::= FOR EACH ROW",
 /* 328 */ "trnm ::= nm",
 /* 329 */ "tridxby ::=",
 /* 330 */ "database_kw_opt ::= DATABASE",
 /* 331 */ "database_kw_opt ::=",
 /* 332 */ "kwcolumn_opt ::=",
 /* 333 */ "kwcolumn_opt ::= COLUMNKW",
 /* 334 */ "vtabarglist ::= vtabarg",
 /* 335 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
 /* 336 */ "vtabarg ::= vtabarg vtabargtoken",
 /* 337 */ "anylist ::=",
 /* 338 */ "anylist ::= anylist LP anylist RP",
 /* 339 */ "anylist ::= anylist ANY",
 /* 340 */ "with ::=",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to sqlite3ParserAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
void sqlite3ParserInit(void *yypRawParser sqlite3ParserCTX_PDECL){
  yyParser *yypParser = (yyParser*)yypRawParser;
  sqlite3ParserCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
  yypParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  yypParser->yytos = NULL;
  yypParser->yystack = NULL;
  yypParser->yystksz = 0;
  if( yyGrowStack(yypParser) ){
    yypParser->yystack = &yypParser->yystk0;
    yypParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  yypParser->yytos = yypParser->yystack;
  yypParser->yystack[0].stateno = 0;
  yypParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to sqlite3Parser and sqlite3ParserFree.
*/
void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) sqlite3ParserCTX_PDECL){
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
    sqlite3ParserCTX_STORE
    sqlite3ParserInit(yypParser sqlite3ParserCTX_PARAM);
  }
  return (void*)yypParser;
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 164: /* select */
    case 196: /* selectnowith */
    case 197: /* oneselect */
    case 208: /* values */
{
#line 440 "parse.y"
sqlite3SelectDelete(pParse->db, (yypminor->yy399));
#line 1770 "parse.c"
}
      break;
    case 174: /* term */
    case 175: /* expr */
    case 203: /* where_opt */
    case 205: /* having_opt */
    case 217: /* on_opt */
    case 230: /* case_operand */
    case 232: /* case_else */
    case 241: /* when_clause */
    case 246: /* key_opt */
{
#line 926 "parse.y"
sqlite3ExprDelete(pParse->db, (yypminor->yy182));
#line 1785 "parse.c"
}
      break;
    case 179: /* eidlist_opt */
    case 188: /* sortlist */
    case 189: /* eidlist */
    case 201: /* selcollist */
    case 204: /* groupby_opt */
    case 206: /* orderby_opt */
    case 209: /* nexprlist */
    case 210: /* exprlist */
    case 211: /* sclp */
    case 222: /* setlist */
    case 229: /* paren_exprlist */
    case 231: /* case_exprlist */
{
#line 1285 "parse.y"
sqlite3ExprListDelete(pParse->db, (yypminor->yy232));
#line 1803 "parse.c"
}
      break;
    case 195: /* fullname */
    case 202: /* from */
    case 213: /* seltablist */
    case 214: /* stl_prefix */
    case 219: /* xfullname */
{
#line 690 "parse.y"
sqlite3SrcListDelete(pParse->db, (yypminor->yy427));
#line 1814 "parse.c"
}
      break;
    case 198: /* wqlist */
{
#line 1559 "parse.y"
sqlite3WithDelete(pParse->db, (yypminor->yy91));
#line 1821 "parse.c"
}
      break;
    case 218: /* using_opt */
    case 220: /* idlist */
    case 224: /* idlist_opt */
{
#line 758 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy510));
#line 1830 "parse.c"
}
      break;
    case 237: /* trigger_cmd_list */
    case 242: /* trigger_cmd */
{
#line 1398 "parse.y"
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy47));
#line 1838 "parse.c"
}
      break;
    case 239: /* trigger_event */
{
#line 1384 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy300).b);
#line 1845 "parse.c"
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
void sqlite3ParserFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void sqlite3ParserFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  sqlite3ParserFinalize(p);
  (*freeProc)(p);
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int sqlite3ParserStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int sqlite3ParserCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_shift_action(
  YYCODETYPE iLookAhead,    /* The look-ahead token */
  YYACTIONTYPE stateno      /* Current state number */
){
  int i;

  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static int yy_find_reduce_action(
  YYACTIONTYPE stateno,     /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
   sqlite3ParserARG_FETCH
   sqlite3ParserCTX_FETCH
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
#line 41 "parse.y"

  sqlite3ErrorMsg(pParse, "parser stack overflow");
#line 2069 "parse.c"
/******** End %stack_overflow code ********************************************/
   sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
   sqlite3ParserCTX_STORE
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  YYACTIONTYPE yyNewState,      /* The new state to shift in */
  YYCODETYPE yyMajor,           /* The major token to shift in */
  sqlite3ParserTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = yyNewState;
  yytos->major = yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {  149,   -1 }, /* (0) explain ::= EXPLAIN */
  {  149,   -3 }, /* (1) explain ::= EXPLAIN QUERY PLAN */
  {  148,   -1 }, /* (2) cmdx ::= cmd */
  {  150,   -3 }, /* (3) cmd ::= BEGIN transtype trans_opt */
  {  151,    0 }, /* (4) transtype ::= */
  {  151,   -1 }, /* (5) transtype ::= DEFERRED */
  {  151,   -1 }, /* (6) transtype ::= IMMEDIATE */
  {  151,   -1 }, /* (7) transtype ::= EXCLUSIVE */
  {  150,   -2 }, /* (8) cmd ::= COMMIT|END trans_opt */
  {  150,   -2 }, /* (9) cmd ::= ROLLBACK trans_opt */
  {  150,   -2 }, /* (10) cmd ::= SAVEPOINT nm */
  {  150,   -3 }, /* (11) cmd ::= RELEASE savepoint_opt nm */
  {  150,   -5 }, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
  {  155,   -6 }, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
  {  157,   -1 }, /* (14) createkw ::= CREATE */
  {  159,    0 }, /* (15) ifnotexists ::= */
  {  159,   -3 }, /* (16) ifnotexists ::= IF NOT EXISTS */
  {  158,   -1 }, /* (17) temp ::= TEMP */
  {  158,    0 }, /* (18) temp ::= */
  {  156,   -5 }, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
  {  156,   -2 }, /* (20) create_table_args ::= AS select */
  {  163,    0 }, /* (21) table_options ::= */
  {  163,   -2 }, /* (22) table_options ::= WITHOUT nm */
  {  165,   -2 }, /* (23) columnname ::= nm typetoken */
  {  167,    0 }, /* (24) typetoken ::= */
  {  167,   -4 }, /* (25) typetoken ::= typename LP signed RP */
  {  167,   -6 }, /* (26) typetoken ::= typename LP signed COMMA signed RP */
  {  168,   -2 }, /* (27) typename ::= typename ID|STRING */
  {  172,    0 }, /* (28) scanpt ::= */
  {  173,   -2 }, /* (29) ccons ::= CONSTRAINT nm */
  {  173,   -4 }, /* (30) ccons ::= DEFAULT scanpt term scanpt */
  {  173,   -4 }, /* (31) ccons ::= DEFAULT LP expr RP */
  {  173,   -4 }, /* (32) ccons ::= DEFAULT PLUS term scanpt */
  {  173,   -4 }, /* (33) ccons ::= DEFAULT MINUS term scanpt */
  {  173,   -3 }, /* (34) ccons ::= DEFAULT scanpt ID|INDEXED */
  {  173,   -3 }, /* (35) ccons ::= NOT NULL onconf */
  {  173,   -5 }, /* (36) ccons ::= PRIMARY KEY sortorder onconf autoinc */
  {  173,   -2 }, /* (37) ccons ::= UNIQUE onconf */
  {  173,   -4 }, /* (38) ccons ::= CHECK LP expr RP */
  {  173,   -4 }, /* (39) ccons ::= REFERENCES nm eidlist_opt refargs */
  {  173,   -1 }, /* (40) ccons ::= defer_subclause */
  {  173,   -2 }, /* (41) ccons ::= COLLATE ID|STRING */
  {  178,    0 }, /* (42) autoinc ::= */
  {  178,   -1 }, /* (43) autoinc ::= AUTOINCR */
  {  180,    0 }, /* (44) refargs ::= */
  {  180,   -2 }, /* (45) refargs ::= refargs refarg */
  {  182,   -2 }, /* (46) refarg ::= MATCH nm */
  {  182,   -3 }, /* (47) refarg ::= ON INSERT refact */
  {  182,   -3 }, /* (48) refarg ::= ON DELETE refact */
  {  182,   -3 }, /* (49) refarg ::= ON UPDATE refact */
  {  183,   -2 }, /* (50) refact ::= SET NULL */
  {  183,   -2 }, /* (51) refact ::= SET DEFAULT */
  {  183,   -1 }, /* (52) refact ::= CASCADE */
  {  183,   -1 }, /* (53) refact ::= RESTRICT */
  {  183,   -2 }, /* (54) refact ::= NO ACTION */
  {  181,   -3 }, /* (55) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
  {  181,   -2 }, /* (56) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
  {  184,    0 }, /* (57) init_deferred_pred_opt ::= */
  {  184,   -2 }, /* (58) init_deferred_pred_opt ::= INITIALLY DEFERRED */
  {  184,   -2 }, /* (59) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
  {  162,    0 }, /* (60) conslist_opt ::= */
  {  186,   -1 }, /* (61) tconscomma ::= COMMA */
  {  187,   -2 }, /* (62) tcons ::= CONSTRAINT nm */
  {  187,   -7 }, /* (63) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
  {  187,   -5 }, /* (64) tcons ::= UNIQUE LP sortlist RP onconf */
  {  187,   -5 }, /* (65) tcons ::= CHECK LP expr RP onconf */
  {  187,  -10 }, /* (66) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
  {  190,    0 }, /* (67) defer_subclause_opt ::= */
  {  176,    0 }, /* (68) onconf ::= */
  {  176,   -3 }, /* (69) onconf ::= ON CONFLICT resolvetype */
  {  191,    0 }, /* (70) orconf ::= */
  {  191,   -2 }, /* (71) orconf ::= OR resolvetype */
  {  192,   -1 }, /* (72) resolvetype ::= IGNORE */
  {  192,   -1 }, /* (73) resolvetype ::= REPLACE */
  {  150,   -4 }, /* (74) cmd ::= DROP TABLE ifexists fullname */
  {  194,   -2 }, /* (75) ifexists ::= IF EXISTS */
  {  194,    0 }, /* (76) ifexists ::= */
  {  150,   -9 }, /* (77) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
  {  150,   -4 }, /* (78) cmd ::= DROP VIEW ifexists fullname */
  {  150,   -1 }, /* (79) cmd ::= select */
  {  164,   -3 }, /* (80) select ::= WITH wqlist selectnowith */
  {  164,   -4 }, /* (81) select ::= WITH RECURSIVE wqlist selectnowith */
  {  164,   -1 }, /* (82) select ::= selectnowith */
  {  196,   -3 }, /* (83) selectnowith ::= selectnowith multiselect_op oneselect */
  {  199,   -1 }, /* (84) multiselect_op ::= UNION */
  {  199,   -2 }, /* (85) multiselect_op ::= UNION ALL */
  {  199,   -1 }, /* (86) multiselect_op ::= EXCEPT|INTERSECT */
  {  197,   -9 }, /* (87) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
  {  208,   -4 }, /* (88) values ::= VALUES LP nexprlist RP */
  {  208,   -5 }, /* (89) values ::= values COMMA LP exprlist RP */
  {  200,   -1 }, /* (90) distinct ::= DISTINCT */
  {  200,   -1 }, /* (91) distinct ::= ALL */
  {  200,    0 }, /* (92) distinct ::= */
  {  211,    0 }, /* (93) sclp ::= */
  {  201,   -5 }, /* (94) selcollist ::= sclp scanpt expr scanpt as */
  {  201,   -3 }, /* (95) selcollist ::= sclp scanpt STAR */
  {  201,   -5 }, /* (96) selcollist ::= sclp scanpt nm DOT STAR */
  {  212,   -2 }, /* (97) as ::= AS nm */
  {  212,    0 }, /* (98) as ::= */
  {  202,    0 }, /* (99) from ::= */
  {  202,   -2 }, /* (100) from ::= FROM seltablist */
  {  214,   -2 }, /* (101) stl_prefix ::= seltablist joinop */
  {  214,    0 }, /* (102) stl_prefix ::= */
  {  213,   -7 }, /* (103) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
  {  213,   -9 }, /* (104) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
  {  213,   -7 }, /* (105) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
  {  213,   -7 }, /* (106) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
  {  160,    0 }, /* (107) dbnm ::= */
  {  160,   -2 }, /* (108) dbnm ::= DOT nm */
  {  195,   -1 }, /* (109) fullname ::= nm */
  {  195,   -3 }, /* (110) fullname ::= nm DOT nm */
  {  219,   -1 }, /* (111) xfullname ::= nm */
  {  219,   -3 }, /* (112) xfullname ::= nm DOT nm */
  {  219,   -5 }, /* (113) xfullname ::= nm DOT nm AS nm */
  {  219,   -3 }, /* (114) xfullname ::= nm AS nm */
  {  215,   -1 }, /* (115) joinop ::= COMMA|JOIN */
  {  215,   -2 }, /* (116) joinop ::= JOIN_KW JOIN */
  {  215,   -3 }, /* (117) joinop ::= JOIN_KW nm JOIN */
  {  215,   -4 }, /* (118) joinop ::= JOIN_KW nm nm JOIN */
  {  217,   -2 }, /* (119) on_opt ::= ON expr */
  {  217,    0 }, /* (120) on_opt ::= */
  {  216,    0 }, /* (121) indexed_opt ::= */
  {  216,   -3 }, /* (122) indexed_opt ::= INDEXED BY nm */
  {  216,   -2 }, /* (123) indexed_opt ::= NOT INDEXED */
  {  218,   -4 }, /* (124) using_opt ::= USING LP idlist RP */
  {  218,    0 }, /* (125) using_opt ::= */
  {  206,    0 }, /* (126) orderby_opt ::= */
  {  206,   -3 }, /* (127) orderby_opt ::= ORDER BY sortlist */
  {  188,   -4 }, /* (128) sortlist ::= sortlist COMMA expr sortorder */
  {  188,   -2 }, /* (129) sortlist ::= expr sortorder */
  {  177,   -1 }, /* (130) sortorder ::= ASC */
  {  177,   -1 }, /* (131) sortorder ::= DESC */
  {  177,    0 }, /* (132) sortorder ::= */
  {  204,    0 }, /* (133) groupby_opt ::= */
  {  204,   -3 }, /* (134) groupby_opt ::= GROUP BY nexprlist */
  {  205,    0 }, /* (135) having_opt ::= */
  {  205,   -2 }, /* (136) having_opt ::= HAVING expr */
  {  207,    0 }, /* (137) limit_opt ::= */
  {  207,   -2 }, /* (138) limit_opt ::= LIMIT expr */
  {  207,   -4 }, /* (139) limit_opt ::= LIMIT expr OFFSET expr */
  {  207,   -4 }, /* (140) limit_opt ::= LIMIT expr COMMA expr */
  {  150,   -6 }, /* (141) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
  {  203,    0 }, /* (142) where_opt ::= */
  {  203,   -2 }, /* (143) where_opt ::= WHERE expr */
  {  150,   -8 }, /* (144) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
  {  222,   -5 }, /* (145) setlist ::= setlist COMMA nm EQ expr */
  {  222,   -7 }, /* (146) setlist ::= setlist COMMA LP idlist RP EQ expr */
  {  222,   -3 }, /* (147) setlist ::= nm EQ expr */
  {  222,   -5 }, /* (148) setlist ::= LP idlist RP EQ expr */
  {  150,   -7 }, /* (149) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
  {  150,   -7 }, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
  {  225,    0 }, /* (151) upsert ::= */
  {  225,  -11 }, /* (152) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
  {  225,   -8 }, /* (153) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
  {  225,   -4 }, /* (154) upsert ::= ON CONFLICT DO NOTHING */
  {  223,   -2 }, /* (155) insert_cmd ::= INSERT orconf */
  {  223,   -1 }, /* (156) insert_cmd ::= REPLACE */
  {  224,    0 }, /* (157) idlist_opt ::= */
  {  224,   -3 }, /* (158) idlist_opt ::= LP idlist RP */
  {  220,   -3 }, /* (159) idlist ::= idlist COMMA nm */
  {  220,   -1 }, /* (160) idlist ::= nm */
  {  175,   -3 }, /* (161) expr ::= LP expr RP */
  {  175,   -1 }, /* (162) expr ::= ID|INDEXED */
  {  175,   -1 }, /* (163) expr ::= JOIN_KW */
  {  175,   -3 }, /* (164) expr ::= nm DOT nm */
  {  175,   -5 }, /* (165) expr ::= nm DOT nm DOT nm */
  {  174,   -1 }, /* (166) term ::= NULL|FLOAT|BLOB */
  {  174,   -1 }, /* (167) term ::= STRING */
  {  174,   -1 }, /* (168) term ::= INTEGER */
  {  175,   -1 }, /* (169) expr ::= VARIABLE */
  {  175,   -3 }, /* (170) expr ::= expr COLLATE ID|STRING */
  {  175,   -6 }, /* (171) expr ::= CAST LP expr AS typetoken RP */
  {  175,   -5 }, /* (172) expr ::= ID|INDEXED LP distinct exprlist RP */
  {  175,   -4 }, /* (173) expr ::= ID|INDEXED LP STAR RP */
  {  174,   -1 }, /* (174) term ::= CTIME_KW */
  {  175,   -5 }, /* (175) expr ::= LP nexprlist COMMA expr RP */
  {  175,   -3 }, /* (176) expr ::= expr AND expr */
  {  175,   -3 }, /* (177) expr ::= expr OR expr */
  {  175,   -3 }, /* (178) expr ::= expr LT|GT|GE|LE expr */
  {  175,   -3 }, /* (179) expr ::= expr EQ|NE expr */
  {  175,   -3 }, /* (180) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
  {  175,   -3 }, /* (181) expr ::= expr PLUS|MINUS expr */
  {  175,   -3 }, /* (182) expr ::= expr STAR|SLASH|REM expr */
  {  175,   -3 }, /* (183) expr ::= expr CONCAT expr */
  {  226,   -2 }, /* (184) likeop ::= NOT LIKE_KW|MATCH */
  {  175,   -3 }, /* (185) expr ::= expr likeop expr */
  {  175,   -5 }, /* (186) expr ::= expr likeop expr ESCAPE expr */
  {  175,   -2 }, /* (187) expr ::= expr ISNULL|NOTNULL */
  {  175,   -3 }, /* (188) expr ::= expr NOT NULL */
  {  175,   -3 }, /* (189) expr ::= expr IS expr */
  {  175,   -4 }, /* (190) expr ::= expr IS NOT expr */
  {  175,   -2 }, /* (191) expr ::= NOT expr */
  {  175,   -2 }, /* (192) expr ::= BITNOT expr */
  {  175,   -2 }, /* (193) expr ::= MINUS expr */
  {  175,   -2 }, /* (194) expr ::= PLUS expr */
  {  227,   -1 }, /* (195) between_op ::= BETWEEN */
  {  227,   -2 }, /* (196) between_op ::= NOT BETWEEN */
  {  175,   -5 }, /* (197) expr ::= expr between_op expr AND expr */
  {  228,   -1 }, /* (198) in_op ::= IN */
  {  228,   -2 }, /* (199) in_op ::= NOT IN */
  {  175,   -5 }, /* (200) expr ::= expr in_op LP exprlist RP */
  {  175,   -3 }, /* (201) expr ::= LP select RP */
  {  175,   -5 }, /* (202) expr ::= expr in_op LP select RP */
  {  175,   -5 }, /* (203) expr ::= expr in_op nm dbnm paren_exprlist */
  {  175,   -4 }, /* (204) expr ::= EXISTS LP select RP */
  {  175,   -5 }, /* (205) expr ::= CASE case_operand case_exprlist case_else END */
  {  231,   -5 }, /* (206) case_exprlist ::= case_exprlist WHEN expr THEN expr */
  {  231,   -4 }, /* (207) case_exprlist ::= WHEN expr THEN expr */
  {  232,   -2 }, /* (208) case_else ::= ELSE expr */
  {  232,    0 }, /* (209) case_else ::= */
  {  230,   -1 }, /* (210) case_operand ::= expr */
  {  230,    0 }, /* (211) case_operand ::= */
  {  210,    0 }, /* (212) exprlist ::= */
  {  209,   -3 }, /* (213) nexprlist ::= nexprlist COMMA expr */
  {  209,   -1 }, /* (214) nexprlist ::= expr */
  {  229,    0 }, /* (215) paren_exprlist ::= */
  {  229,   -3 }, /* (216) paren_exprlist ::= LP exprlist RP */
  {  150,  -12 }, /* (217) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
  {  233,   -1 }, /* (218) uniqueflag ::= UNIQUE */
  {  233,    0 }, /* (219) uniqueflag ::= */
  {  179,    0 }, /* (220) eidlist_opt ::= */
  {  179,   -3 }, /* (221) eidlist_opt ::= LP eidlist RP */
  {  189,   -5 }, /* (222) eidlist ::= eidlist COMMA nm collate sortorder */
  {  189,   -3 }, /* (223) eidlist ::= nm collate sortorder */
  {  234,    0 }, /* (224) collate ::= */
  {  234,   -2 }, /* (225) collate ::= COLLATE ID|STRING */
  {  150,   -4 }, /* (226) cmd ::= DROP INDEX ifexists fullname */
  {  150,   -1 }, /* (227) cmd ::= VACUUM */
  {  150,   -2 }, /* (228) cmd ::= VACUUM nm */
  {  150,   -3 }, /* (229) cmd ::= PRAGMA nm dbnm */
  {  150,   -5 }, /* (230) cmd ::= PRAGMA nm dbnm EQ nmnum */
  {  150,   -6 }, /* (231) cmd ::= PRAGMA nm dbnm LP nmnum RP */
  {  150,   -5 }, /* (232) cmd ::= PRAGMA nm dbnm EQ minus_num */
  {  150,   -6 }, /* (233) cmd ::= PRAGMA nm dbnm LP minus_num RP */
  {  170,   -2 }, /* (234) plus_num ::= PLUS INTEGER|FLOAT */
  {  171,   -2 }, /* (235) minus_num ::= MINUS INTEGER|FLOAT */
  {  150,   -5 }, /* (236) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
  {  236,  -11 }, /* (237) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
  {  238,   -1 }, /* (238) trigger_time ::= BEFORE|AFTER */
  {  238,   -2 }, /* (239) trigger_time ::= INSTEAD OF */
  {  238,    0 }, /* (240) trigger_time ::= */
  {  239,   -1 }, /* (241) trigger_event ::= DELETE|INSERT */
  {  239,   -1 }, /* (242) trigger_event ::= UPDATE */
  {  239,   -3 }, /* (243) trigger_event ::= UPDATE OF idlist */
  {  241,    0 }, /* (244) when_clause ::= */
  {  241,   -2 }, /* (245) when_clause ::= WHEN expr */
  {  237,   -3 }, /* (246) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
  {  237,   -2 }, /* (247) trigger_cmd_list ::= trigger_cmd SEMI */
  {  243,   -3 }, /* (248) trnm ::= nm DOT nm */
  {  244,   -3 }, /* (249) tridxby ::= INDEXED BY nm */
  {  244,   -2 }, /* (250) tridxby ::= NOT INDEXED */
  {  242,   -8 }, /* (251) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
  {  242,   -8 }, /* (252) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
  {  242,   -6 }, /* (253) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
  {  242,   -3 }, /* (254) trigger_cmd ::= scanpt select scanpt */
  {  175,   -4 }, /* (255) expr ::= RAISE LP IGNORE RP */
  {  175,   -6 }, /* (256) expr ::= RAISE LP raisetype COMMA nm RP */
  {  193,   -1 }, /* (257) raisetype ::= ROLLBACK */
  {  193,   -1 }, /* (258) raisetype ::= ABORT */
  {  193,   -1 }, /* (259) raisetype ::= FAIL */
  {  150,   -4 }, /* (260) cmd ::= DROP TRIGGER ifexists fullname */
  {  150,   -6 }, /* (261) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
  {  150,   -3 }, /* (262) cmd ::= DETACH database_kw_opt expr */
  {  246,    0 }, /* (263) key_opt ::= */
  {  246,   -2 }, /* (264) key_opt ::= KEY expr */
  {  150,   -1 }, /* (265) cmd ::= REINDEX */
  {  150,   -3 }, /* (266) cmd ::= REINDEX nm dbnm */
  {  150,   -1 }, /* (267) cmd ::= ANALYZE */
  {  150,   -3 }, /* (268) cmd ::= ANALYZE nm dbnm */
  {  150,   -6 }, /* (269) cmd ::= ALTER TABLE fullname RENAME TO nm */
  {  150,   -7 }, /* (270) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
  {  247,   -1 }, /* (271) add_column_fullname ::= fullname */
  {  150,   -1 }, /* (272) cmd ::= create_vtab */
  {  150,   -4 }, /* (273) cmd ::= create_vtab LP vtabarglist RP */
  {  249,   -8 }, /* (274) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
  {  251,    0 }, /* (275) vtabarg ::= */
  {  252,   -1 }, /* (276) vtabargtoken ::= ANY */
  {  252,   -3 }, /* (277) vtabargtoken ::= lp anylist RP */
  {  253,   -1 }, /* (278) lp ::= LP */
  {  221,   -2 }, /* (279) with ::= WITH wqlist */
  {  221,   -3 }, /* (280) with ::= WITH RECURSIVE wqlist */
  {  198,   -6 }, /* (281) wqlist ::= nm eidlist_opt AS LP select RP */
  {  198,   -8 }, /* (282) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
  {  145,   -1 }, /* (283) input ::= cmdlist */
  {  146,   -2 }, /* (284) cmdlist ::= cmdlist ecmd */
  {  146,   -1 }, /* (285) cmdlist ::= ecmd */
  {  147,   -1 }, /* (286) ecmd ::= SEMI */
  {  147,   -2 }, /* (287) ecmd ::= cmdx SEMI */
  {  147,   -2 }, /* (288) ecmd ::= explain cmdx */
  {  152,    0 }, /* (289) trans_opt ::= */
  {  152,   -1 }, /* (290) trans_opt ::= TRANSACTION */
  {  152,   -2 }, /* (291) trans_opt ::= TRANSACTION nm */
  {  154,   -1 }, /* (292) savepoint_opt ::= SAVEPOINT */
  {  154,    0 }, /* (293) savepoint_opt ::= */
  {  150,   -2 }, /* (294) cmd ::= create_table create_table_args */
  {  161,   -4 }, /* (295) columnlist ::= columnlist COMMA columnname carglist */
  {  161,   -2 }, /* (296) columnlist ::= columnname carglist */
  {  153,   -1 }, /* (297) nm ::= ID|INDEXED */
  {  153,   -1 }, /* (298) nm ::= STRING */
  {  153,   -1 }, /* (299) nm ::= JOIN_KW */
  {  167,   -1 }, /* (300) typetoken ::= typename */
  {  168,   -1 }, /* (301) typename ::= ID|STRING */
  {  169,   -1 }, /* (302) signed ::= plus_num */
  {  169,   -1 }, /* (303) signed ::= minus_num */
  {  166,   -2 }, /* (304) carglist ::= carglist ccons */
  {  166,    0 }, /* (305) carglist ::= */
  {  173,   -2 }, /* (306) ccons ::= NULL onconf */
  {  162,   -2 }, /* (307) conslist_opt ::= COMMA conslist */
  {  185,   -3 }, /* (308) conslist ::= conslist tconscomma tcons */
  {  185,   -1 }, /* (309) conslist ::= tcons */
  {  186,    0 }, /* (310) tconscomma ::= */
  {  190,   -1 }, /* (311) defer_subclause_opt ::= defer_subclause */
  {  192,   -1 }, /* (312) resolvetype ::= raisetype */
  {  196,   -1 }, /* (313) selectnowith ::= oneselect */
  {  197,   -1 }, /* (314) oneselect ::= values */
  {  211,   -2 }, /* (315) sclp ::= selcollist COMMA */
  {  212,   -1 }, /* (316) as ::= ID|STRING */
  {  175,   -1 }, /* (317) expr ::= term */
  {  226,   -1 }, /* (318) likeop ::= LIKE_KW|MATCH */
  {  210,   -1 }, /* (319) exprlist ::= nexprlist */
  {  235,   -1 }, /* (320) nmnum ::= plus_num */
  {  235,   -1 }, /* (321) nmnum ::= nm */
  {  235,   -1 }, /* (322) nmnum ::= ON */
  {  235,   -1 }, /* (323) nmnum ::= DELETE */
  {  235,   -1 }, /* (324) nmnum ::= DEFAULT */
  {  170,   -1 }, /* (325) plus_num ::= INTEGER|FLOAT */
  {  240,    0 }, /* (326) foreach_clause ::= */
  {  240,   -3 }, /* (327) foreach_clause ::= FOR EACH ROW */
  {  243,   -1 }, /* (328) trnm ::= nm */
  {  244,    0 }, /* (329) tridxby ::= */
  {  245,   -1 }, /* (330) database_kw_opt ::= DATABASE */
  {  245,    0 }, /* (331) database_kw_opt ::= */
  {  248,    0 }, /* (332) kwcolumn_opt ::= */
  {  248,   -1 }, /* (333) kwcolumn_opt ::= COLUMNKW */
  {  250,   -1 }, /* (334) vtabarglist ::= vtabarg */
  {  250,   -3 }, /* (335) vtabarglist ::= vtabarglist COMMA vtabarg */
  {  251,   -2 }, /* (336) vtabarg ::= vtabarg vtabargtoken */
  {  254,    0 }, /* (337) anylist ::= */
  {  254,   -4 }, /* (338) anylist ::= anylist LP anylist RP */
  {  254,   -2 }, /* (339) anylist ::= anylist ANY */
  {  221,    0 }, /* (340) with ::= */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static YYACTIONTYPE yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  sqlite3ParserTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  sqlite3ParserCTX_PDECL                   /* %extra_context */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  sqlite3ParserARG_FETCH
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      /* The call to yyStackOverflow() above pops the stack until it is
      ** empty, causing the main parser loop to exit.  So the return value
      ** is never used and does not matter. */
      return 0;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        /* The call to yyStackOverflow() above pops the stack until it is
        ** empty, causing the main parser loop to exit.  So the return value
        ** is never used and does not matter. */
        return 0;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* explain ::= EXPLAIN */
#line 121 "parse.y"
{ pParse->explain = 1; }
#line 2575 "parse.c"
        break;
      case 1: /* explain ::= EXPLAIN QUERY PLAN */
#line 122 "parse.y"
{ pParse->explain = 2; }
#line 2580 "parse.c"
        break;
      case 2: /* cmdx ::= cmd */
#line 124 "parse.y"
{ sqlite3FinishCoding(pParse); }
#line 2585 "parse.c"
        break;
      case 3: /* cmd ::= BEGIN transtype trans_opt */
#line 129 "parse.y"
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy502);}
#line 2590 "parse.c"
        break;
      case 4: /* transtype ::= */
#line 134 "parse.y"
{yymsp[1].minor.yy502 = TK_DEFERRED;}
#line 2595 "parse.c"
        break;
      case 5: /* transtype ::= DEFERRED */
      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
#line 135 "parse.y"
{yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-X*/}
#line 2602 "parse.c"
        break;
      case 8: /* cmd ::= COMMIT|END trans_opt */
      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
#line 138 "parse.y"
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
#line 2608 "parse.c"
        break;
      case 10: /* cmd ::= SAVEPOINT nm */
#line 143 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
}
#line 2615 "parse.c"
        break;
      case 11: /* cmd ::= RELEASE savepoint_opt nm */
#line 146 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
}
#line 2622 "parse.c"
        break;
      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
#line 149 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
#line 2629 "parse.c"
        break;
      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
#line 156 "parse.y"
{
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy502,0,0,yymsp[-2].minor.yy502);
}
#line 2636 "parse.c"
        break;
      case 14: /* createkw ::= CREATE */
#line 159 "parse.y"
{disableLookaside(pParse);}
#line 2641 "parse.c"
        break;
      case 15: /* ifnotexists ::= */
      case 18: /* temp ::= */ yytestcase(yyruleno==18);
      case 21: /* table_options ::= */ yytestcase(yyruleno==21);
      case 42: /* autoinc ::= */ yytestcase(yyruleno==42);
      case 57: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==57);
      case 67: /* defer_subclause_opt ::= */ yytestcase(yyruleno==67);
      case 76: /* ifexists ::= */ yytestcase(yyruleno==76);
      case 92: /* distinct ::= */ yytestcase(yyruleno==92);
      case 224: /* collate ::= */ yytestcase(yyruleno==224);
#line 162 "parse.y"
{yymsp[1].minor.yy502 = 0;}
#line 2654 "parse.c"
        break;
      case 16: /* ifnotexists ::= IF NOT EXISTS */
#line 163 "parse.y"
{yymsp[-2].minor.yy502 = 1;}
#line 2659 "parse.c"
        break;
      case 17: /* temp ::= TEMP */
      case 43: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==43);
#line 166 "parse.y"
{yymsp[0].minor.yy502 = 1;}
#line 2665 "parse.c"
        break;
      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
#line 169 "parse.y"
{
  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy502,0);
}
#line 2672 "parse.c"
        break;
      case 20: /* create_table_args ::= AS select */
#line 172 "parse.y"
{
  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy399);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy399);
}
#line 2680 "parse.c"
        break;
      case 22: /* table_options ::= WITHOUT nm */
#line 178 "parse.y"
{
  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
    yymsp[-1].minor.yy502 = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{
    yymsp[-1].minor.yy502 = 0;
    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}
#line 2692 "parse.c"
        break;
      case 23: /* columnname ::= nm typetoken */
#line 188 "parse.y"
{sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
#line 2697 "parse.c"
        break;
      case 24: /* typetoken ::= */
      case 60: /* conslist_opt ::= */ yytestcase(yyruleno==60);
      case 98: /* as ::= */ yytestcase(yyruleno==98);
#line 268 "parse.y"
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
#line 2704 "parse.c"
        break;
      case 25: /* typetoken ::= typename LP signed RP */
#line 270 "parse.y"
{
  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
#line 2711 "parse.c"
        break;
      case 26: /* typetoken ::= typename LP signed COMMA signed RP */
#line 273 "parse.y"
{
  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
#line 2718 "parse.c"
        break;
      case 27: /* typename ::= typename ID|STRING */
#line 278 "parse.y"
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
#line 2723 "parse.c"
        break;
      case 28: /* scanpt ::= */
#line 296 "parse.y"
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy36 = yyLookaheadToken.z;
}
#line 2731 "parse.c"
        break;
      case 29: /* ccons ::= CONSTRAINT nm */
      case 62: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==62);
#line 306 "parse.y"
{pParse->constraintName = yymsp[0].minor.yy0;}
#line 2737 "parse.c"
        break;
      case 30: /* ccons ::= DEFAULT scanpt term scanpt */
#line 308 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy182,yymsp[-2].minor.yy36,yymsp[0].minor.yy36);}
#line 2742 "parse.c"
        break;
      case 31: /* ccons ::= DEFAULT LP expr RP */
#line 310 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy182,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
#line 2747 "parse.c"
        break;
      case 32: /* ccons ::= DEFAULT PLUS term scanpt */
#line 312 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy182,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy36);}
#line 2752 "parse.c"
        break;
      case 33: /* ccons ::= DEFAULT MINUS term scanpt */
#line 313 "parse.y"
{
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[-1].minor.yy182, 0);
  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy36);
}
#line 2760 "parse.c"
        break;
      case 34: /* ccons ::= DEFAULT scanpt ID|INDEXED */
#line 317 "parse.y"
{
  Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
  if( p ){
    sqlite3ExprIdToTrueFalse(p);
    testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
  }
  sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
#line 2772 "parse.c"
        break;
      case 35: /* ccons ::= NOT NULL onconf */
#line 330 "parse.y"
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy502);}
#line 2777 "parse.c"
        break;
      case 36: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
#line 332 "parse.y"
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy502,yymsp[0].minor.yy502,yymsp[-2].minor.yy502);}
#line 2782 "parse.c"
        break;
      case 37: /* ccons ::= UNIQUE onconf */
#line 333 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy502,0,0,0,0,
                                   SQLITE_IDXTYPE_UNIQUE);}
#line 2788 "parse.c"
        break;
      case 38: /* ccons ::= CHECK LP expr RP */
#line 335 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy182);}
#line 2793 "parse.c"
        break;
      case 39: /* ccons ::= REFERENCES nm eidlist_opt refargs */
#line 337 "parse.y"
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy232,yymsp[0].minor.yy502);}
#line 2798 "parse.c"
        break;
      case 40: /* ccons ::= defer_subclause */
#line 338 "parse.y"
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy502);}
#line 2803 "parse.c"
        break;
      case 41: /* ccons ::= COLLATE ID|STRING */
#line 339 "parse.y"
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
#line 2808 "parse.c"
        break;
      case 44: /* refargs ::= */
#line 352 "parse.y"
{ yymsp[1].minor.yy502 = OE_None*0x0101; /* EV: R-19803-45884 */}
#line 2813 "parse.c"
        break;
      case 45: /* refargs ::= refargs refarg */
#line 353 "parse.y"
{ yymsp[-1].minor.yy502 = (yymsp[-1].minor.yy502 & ~yymsp[0].minor.yy107.mask) | yymsp[0].minor.yy107.value; }
#line 2818 "parse.c"
        break;
      case 46: /* refarg ::= MATCH nm */
#line 355 "parse.y"
{ yymsp[-1].minor.yy107.value = 0;     yymsp[-1].minor.yy107.mask = 0x000000; }
#line 2823 "parse.c"
        break;
      case 47: /* refarg ::= ON INSERT refact */
#line 356 "parse.y"
{ yymsp[-2].minor.yy107.value = 0;     yymsp[-2].minor.yy107.mask = 0x000000; }
#line 2828 "parse.c"
        break;
      case 48: /* refarg ::= ON DELETE refact */
#line 357 "parse.y"
{ yymsp[-2].minor.yy107.value = yymsp[0].minor.yy502;     yymsp[-2].minor.yy107.mask = 0x0000ff; }
#line 2833 "parse.c"
        break;
      case 49: /* refarg ::= ON UPDATE refact */
#line 358 "parse.y"
{ yymsp[-2].minor.yy107.value = yymsp[0].minor.yy502<<8;  yymsp[-2].minor.yy107.mask = 0x00ff00; }
#line 2838 "parse.c"
        break;
      case 50: /* refact ::= SET NULL */
#line 360 "parse.y"
{ yymsp[-1].minor.yy502 = OE_SetNull;  /* EV: R-33326-45252 */}
#line 2843 "parse.c"
        break;
      case 51: /* refact ::= SET DEFAULT */
#line 361 "parse.y"
{ yymsp[-1].minor.yy502 = OE_SetDflt;  /* EV: R-33326-45252 */}
#line 2848 "parse.c"
        break;
      case 52: /* refact ::= CASCADE */
#line 362 "parse.y"
{ yymsp[0].minor.yy502 = OE_Cascade;  /* EV: R-33326-45252 */}
#line 2853 "parse.c"
        break;
      case 53: /* refact ::= RESTRICT */
#line 363 "parse.y"
{ yymsp[0].minor.yy502 = OE_Restrict; /* EV: R-33326-45252 */}
#line 2858 "parse.c"
        break;
      case 54: /* refact ::= NO ACTION */
#line 364 "parse.y"
{ yymsp[-1].minor.yy502 = OE_None;     /* EV: R-33326-45252 */}
#line 2863 "parse.c"
        break;
      case 55: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
#line 366 "parse.y"
{yymsp[-2].minor.yy502 = 0;}
#line 2868 "parse.c"
        break;
      case 56: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
      case 71: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==71);
      case 155: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==155);
#line 367 "parse.y"
{yymsp[-1].minor.yy502 = yymsp[0].minor.yy502;}
#line 2875 "parse.c"
        break;
      case 58: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
      case 75: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==75);
      case 196: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==196);
      case 199: /* in_op ::= NOT IN */ yytestcase(yyruleno==199);
      case 225: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==225);
#line 370 "parse.y"
{yymsp[-1].minor.yy502 = 1;}
#line 2884 "parse.c"
        break;
      case 59: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
#line 371 "parse.y"
{yymsp[-1].minor.yy502 = 0;}
#line 2889 "parse.c"
        break;
      case 61: /* tconscomma ::= COMMA */
#line 377 "parse.y"
{pParse->constraintName.n = 0;}
#line 2894 "parse.c"
        break;
      case 63: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
#line 381 "parse.y"
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy232,yymsp[0].minor.yy502,yymsp[-2].minor.yy502,0);}
#line 2899 "parse.c"
        break;
      case 64: /* tcons ::= UNIQUE LP sortlist RP onconf */
#line 383 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy232,yymsp[0].minor.yy502,0,0,0,0,
                                       SQLITE_IDXTYPE_UNIQUE);}
#line 2905 "parse.c"
        break;
      case 65: /* tcons ::= CHECK LP expr RP onconf */
#line 386 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy182);}
#line 2910 "parse.c"
        break;
      case 66: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
#line 388 "parse.y"
{
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy232, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy232, yymsp[-1].minor.yy502);
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy502);
}
#line 2918 "parse.c"
        break;
      case 68: /* onconf ::= */
      case 70: /* orconf ::= */ yytestcase(yyruleno==70);
#line 402 "parse.y"
{yymsp[1].minor.yy502 = OE_Default;}
#line 2924 "parse.c"
        break;
      case 69: /* onconf ::= ON CONFLICT resolvetype */
#line 403 "parse.y"
{yymsp[-2].minor.yy502 = yymsp[0].minor.yy502;}
#line 2929 "parse.c"
        break;
      case 72: /* resolvetype ::= IGNORE */
#line 407 "parse.y"
{yymsp[0].minor.yy502 = OE_Ignore;}
#line 2934 "parse.c"
        break;
      case 73: /* resolvetype ::= REPLACE */
      case 156: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==156);
#line 408 "parse.y"
{yymsp[0].minor.yy502 = OE_Replace;}
#line 2940 "parse.c"
        break;
      case 74: /* cmd ::= DROP TABLE ifexists fullname */
#line 412 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy427, 0, yymsp[-1].minor.yy502);
}
#line 2947 "parse.c"
        break;
      case 77: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
#line 423 "parse.y"
{
  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy232, yymsp[0].minor.yy399, yymsp[-7].minor.yy502, yymsp[-5].minor.yy502);
}
#line 2954 "parse.c"
        break;
      case 78: /* cmd ::= DROP VIEW ifexists fullname */
#line 426 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy427, 1, yymsp[-1].minor.yy502);
}
#line 2961 "parse.c"
        break;
      case 79: /* cmd ::= select */
#line 433 "parse.y"
{
  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0};
  sqlite3Select(pParse, yymsp[0].minor.yy399, &dest);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy399);
}
#line 2970 "parse.c"
        break;
      case 80: /* select ::= WITH wqlist selectnowith */
#line 471 "parse.y"
{
  Select *p = yymsp[0].minor.yy399;
  if( p ){
    p->pWith = yymsp[-1].minor.yy91;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy91);
  }
  yymsp[-2].minor.yy399 = p;
}
#line 2984 "parse.c"
        break;
      case 81: /* select ::= WITH RECURSIVE wqlist selectnowith */
#line 481 "parse.y"
{
  Select *p = yymsp[0].minor.yy399;
  if( p ){
    p->pWith = yymsp[-1].minor.yy91;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy91);
  }
  yymsp[-3].minor.yy399 = p;
}
#line 2998 "parse.c"
        break;
      case 82: /* select ::= selectnowith */
#line 492 "parse.y"
{
  Select *p = yymsp[0].minor.yy399;
  if( p ){
    parserDoubleLinkSelect(pParse, p);
  }
  yymsp[0].minor.yy399 = p; /*A-overwrites-X*/
}
#line 3009 "parse.c"
        break;
      case 83: /* selectnowith ::= selectnowith multiselect_op oneselect */
#line 502 "parse.y"
{
  Select *pRhs = yymsp[0].minor.yy399;
  Select *pLhs = yymsp[-2].minor.yy399;
  if( pRhs && pRhs->pPrior ){
    SrcList *pFrom;
    Token x;
    x.n = 0;
    parserDoubleLinkSelect(pParse, pRhs);
    pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
    pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
  }
  if( pRhs ){
    pRhs->op = (u8)yymsp[-1].minor.yy502;
    pRhs->pPrior = pLhs;
    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
    pRhs->selFlags &= ~SF_MultiValue;
    if( yymsp[-1].minor.yy502!=TK_ALL ) pParse->hasCompound = 1;
  }else{
    sqlite3SelectDelete(pParse->db, pLhs);
  }
  yymsp[-2].minor.yy399 = pRhs;
}
#line 3035 "parse.c"
        break;
      case 84: /* multiselect_op ::= UNION */
      case 86: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==86);
#line 525 "parse.y"
{yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-OP*/}
#line 3041 "parse.c"
        break;
      case 85: /* multiselect_op ::= UNION ALL */
#line 526 "parse.y"
{yymsp[-1].minor.yy502 = TK_ALL;}
#line 3046 "parse.c"
        break;
      case 87: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
#line 530 "parse.y"
{
#if SELECTTRACE_ENABLED
  Token s = yymsp[-8].minor.yy0; /*A-overwrites-S*/
#endif
  yymsp[-8].minor.yy399 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy232,yymsp[-5].minor.yy427,yymsp[-4].minor.yy182,yymsp[-3].minor.yy232,yymsp[-2].minor.yy182,yymsp[-1].minor.yy232,yymsp[-7].minor.yy502,yymsp[0].minor.yy182);
#if SELECTTRACE_ENABLED
  /* Populate the Select.zSelName[] string that is used to help with
  ** query planner debugging, to differentiate between multiple Select
  ** objects in a complex query.
  **
  ** If the SELECT keyword is immediately followed by a C-style comment
  ** then extract the first few alphanumeric characters from within that
  ** comment to be the zSelName value.  Otherwise, the label is #N where
  ** is an integer that is incremented with each SELECT statement seen.
  */
  if( yymsp[-8].minor.yy399!=0 ){
    const char *z = s.z+6;
    int i;
    sqlite3_snprintf(sizeof(yymsp[-8].minor.yy399->zSelName), yymsp[-8].minor.yy399->zSelName,"#%d",++pParse->nSelect);
    while( z[0]==' ' ) z++;
    if( z[0]=='/' && z[1]=='*' ){
      z += 2;
      while( z[0]==' ' ) z++;
      for(i=0; sqlite3Isalnum(z[i]); i++){}
      sqlite3_snprintf(sizeof(yymsp[-8].minor.yy399->zSelName), yymsp[-8].minor.yy399->zSelName, "%.*s", i, z);
    }
  }
#endif /* SELECTRACE_ENABLED */
}
#line 3079 "parse.c"
        break;
      case 88: /* values ::= VALUES LP nexprlist RP */
#line 563 "parse.y"
{
  yymsp[-3].minor.yy399 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy232,0,0,0,0,0,SF_Values,0);
}
#line 3086 "parse.c"
        break;
      case 89: /* values ::= values COMMA LP exprlist RP */
#line 566 "parse.y"
{
  Select *pRight, *pLeft = yymsp[-4].minor.yy399;
  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy232,0,0,0,0,0,SF_Values|SF_MultiValue,0);
  if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
  if( pRight ){
    pRight->op = TK_ALL;
    pRight->pPrior = pLeft;
    yymsp[-4].minor.yy399 = pRight;
  }else{
    yymsp[-4].minor.yy399 = pLeft;
  }
}
#line 3102 "parse.c"
        break;
      case 90: /* distinct ::= DISTINCT */
#line 583 "parse.y"
{yymsp[0].minor.yy502 = SF_Distinct;}
#line 3107 "parse.c"
        break;
      case 91: /* distinct ::= ALL */
#line 584 "parse.y"
{yymsp[0].minor.yy502 = SF_All;}
#line 3112 "parse.c"
        break;
      case 93: /* sclp ::= */
      case 126: /* orderby_opt ::= */ yytestcase(yyruleno==126);
      case 133: /* groupby_opt ::= */ yytestcase(yyruleno==133);
      case 212: /* exprlist ::= */ yytestcase(yyruleno==212);
      case 215: /* paren_exprlist ::= */ yytestcase(yyruleno==215);
      case 220: /* eidlist_opt ::= */ yytestcase(yyruleno==220);
#line 597 "parse.y"
{yymsp[1].minor.yy232 = 0;}
#line 3122 "parse.c"
        break;
      case 94: /* selcollist ::= sclp scanpt expr scanpt as */
#line 598 "parse.y"
{
   yymsp[-4].minor.yy232 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy232, yymsp[-2].minor.yy182);
   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy232, &yymsp[0].minor.yy0, 1);
   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy232,yymsp[-3].minor.yy36,yymsp[-1].minor.yy36);
}
#line 3131 "parse.c"
        break;
      case 95: /* selcollist ::= sclp scanpt STAR */
#line 603 "parse.y"
{
  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
  yymsp[-2].minor.yy232 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy232, p);
}
#line 3139 "parse.c"
        break;
      case 96: /* selcollist ::= sclp scanpt nm DOT STAR */
#line 607 "parse.y"
{
  Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
  Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
  yymsp[-4].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy232, pDot);
}
#line 3149 "parse.c"
        break;
      case 97: /* as ::= AS nm */
      case 108: /* dbnm ::= DOT nm */ yytestcase(yyruleno==108);
      case 234: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==234);
      case 235: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==235);
#line 618 "parse.y"
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
#line 3157 "parse.c"
        break;
      case 99: /* from ::= */
#line 632 "parse.y"
{yymsp[1].minor.yy427 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy427));}
#line 3162 "parse.c"
        break;
      case 100: /* from ::= FROM seltablist */
#line 633 "parse.y"
{
  yymsp[-1].minor.yy427 = yymsp[0].minor.yy427;
  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy427);
}
#line 3170 "parse.c"
        break;
      case 101: /* stl_prefix ::= seltablist joinop */
#line 641 "parse.y"
{
   if( ALWAYS(yymsp[-1].minor.yy427 && yymsp[-1].minor.yy427->nSrc>0) ) yymsp[-1].minor.yy427->a[yymsp[-1].minor.yy427->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy502;
}
#line 3177 "parse.c"
        break;
      case 102: /* stl_prefix ::= */
#line 644 "parse.y"
{yymsp[1].minor.yy427 = 0;}
#line 3182 "parse.c"
        break;
      case 103: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
#line 646 "parse.y"
{
  yymsp[-6].minor.yy427 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy427,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy182,yymsp[0].minor.yy510);
  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy427, &yymsp[-2].minor.yy0);
}
#line 3190 "parse.c"
        break;
      case 104: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
#line 651 "parse.y"
{
  yymsp[-8].minor.yy427 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy427,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy182,yymsp[0].minor.yy510);
  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy427, yymsp[-4].minor.yy232);
}
#line 3198 "parse.c"
        break;
      case 105: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
#line 657 "parse.y"
{
    yymsp[-6].minor.yy427 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy427,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy399,yymsp[-1].minor.yy182,yymsp[0].minor.yy510);
  }
#line 3205 "parse.c"
        break;
      case 106: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
#line 661 "parse.y"
{
    if( yymsp[-6].minor.yy427==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy182==0 && yymsp[0].minor.yy510==0 ){
      yymsp[-6].minor.yy427 = yymsp[-4].minor.yy427;
    }else if( yymsp[-4].minor.yy427->nSrc==1 ){
      yymsp[-6].minor.yy427 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy427,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy182,yymsp[0].minor.yy510);
      if( yymsp[-6].minor.yy427 ){
        struct SrcList_item *pNew = &yymsp[-6].minor.yy427->a[yymsp[-6].minor.yy427->nSrc-1];
        struct SrcList_item *pOld = yymsp[-4].minor.yy427->a;
        pNew->zName = pOld->zName;
        pNew->zDatabase = pOld->zDatabase;
        pNew->pSelect = pOld->pSelect;
        pOld->zName = pOld->zDatabase = 0;
        pOld->pSelect = 0;
      }
      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy427);
    }else{
      Select *pSubquery;
      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy427);
      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy427,0,0,0,0,SF_NestedFrom,0);
      yymsp[-6].minor.yy427 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy427,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy182,yymsp[0].minor.yy510);
    }
  }
#line 3231 "parse.c"
        break;
      case 107: /* dbnm ::= */
      case 121: /* indexed_opt ::= */ yytestcase(yyruleno==121);
#line 686 "parse.y"
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
#line 3237 "parse.c"
        break;
      case 109: /* fullname ::= nm */
      case 111: /* xfullname ::= nm */ yytestcase(yyruleno==111);
#line 692 "parse.y"
{yymsp[0].minor.yy427 = sqlite3SrcListAppend(pParse->db,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
#line 3243 "parse.c"
        break;
      case 110: /* fullname ::= nm DOT nm */
      case 112: /* xfullname ::= nm DOT nm */ yytestcase(yyruleno==112);
#line 694 "parse.y"
{yymsp[-2].minor.yy427 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 3249 "parse.c"
        break;
      case 113: /* xfullname ::= nm DOT nm AS nm */
#line 702 "parse.y"
{
   yymsp[-4].minor.yy427 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
   if( yymsp[-4].minor.yy427 ) yymsp[-4].minor.yy427->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 3257 "parse.c"
        break;
      case 114: /* xfullname ::= nm AS nm */
#line 706 "parse.y"
{  
   yymsp[-2].minor.yy427 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
   if( yymsp[-2].minor.yy427 ) yymsp[-2].minor.yy427->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 3265 "parse.c"
        break;
      case 115: /* joinop ::= COMMA|JOIN */
#line 712 "parse.y"
{ yymsp[0].minor.yy502 = JT_INNER; }
#line 3270 "parse.c"
        break;
      case 116: /* joinop ::= JOIN_KW JOIN */
#line 714 "parse.y"
{yymsp[-1].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
#line 3275 "parse.c"
        break;
      case 117: /* joinop ::= JOIN_KW nm JOIN */
#line 716 "parse.y"
{yymsp[-2].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
#line 3280 "parse.c"
        break;
      case 118: /* joinop ::= JOIN_KW nm nm JOIN */
#line 718 "parse.y"
{yymsp[-3].minor.yy502 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
#line 3285 "parse.c"
        break;
      case 119: /* on_opt ::= ON expr */
      case 136: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==136);
      case 143: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==143);
      case 208: /* case_else ::= ELSE expr */ yytestcase(yyruleno==208);
#line 739 "parse.y"
{yymsp[-1].minor.yy182 = yymsp[0].minor.yy182;}
#line 3293 "parse.c"
        break;
      case 120: /* on_opt ::= */
      case 135: /* having_opt ::= */ yytestcase(yyruleno==135);
      case 137: /* limit_opt ::= */ yytestcase(yyruleno==137);
      case 142: /* where_opt ::= */ yytestcase(yyruleno==142);
      case 209: /* case_else ::= */ yytestcase(yyruleno==209);
      case 211: /* case_operand ::= */ yytestcase(yyruleno==211);
#line 740 "parse.y"
{yymsp[1].minor.yy182 = 0;}
#line 3303 "parse.c"
        break;
      case 122: /* indexed_opt ::= INDEXED BY nm */
#line 754 "parse.y"
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
#line 3308 "parse.c"
        break;
      case 123: /* indexed_opt ::= NOT INDEXED */
#line 755 "parse.y"
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
#line 3313 "parse.c"
        break;
      case 124: /* using_opt ::= USING LP idlist RP */
#line 759 "parse.y"
{yymsp[-3].minor.yy510 = yymsp[-1].minor.yy510;}
#line 3318 "parse.c"
        break;
      case 125: /* using_opt ::= */
      case 157: /* idlist_opt ::= */ yytestcase(yyruleno==157);
#line 760 "parse.y"
{yymsp[1].minor.yy510 = 0;}
#line 3324 "parse.c"
        break;
      case 127: /* orderby_opt ::= ORDER BY sortlist */
      case 134: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==134);
#line 774 "parse.y"
{yymsp[-2].minor.yy232 = yymsp[0].minor.yy232;}
#line 3330 "parse.c"
        break;
      case 128: /* sortlist ::= sortlist COMMA expr sortorder */
#line 775 "parse.y"
{
  yymsp[-3].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy232,yymsp[-1].minor.yy182);
  sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy232,yymsp[0].minor.yy502);
}
#line 3338 "parse.c"
        break;
      case 129: /* sortlist ::= expr sortorder */
#line 779 "parse.y"
{
  yymsp[-1].minor.yy232 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy182); /*A-overwrites-Y*/
  sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy232,yymsp[0].minor.yy502);
}
#line 3346 "parse.c"
        break;
      case 130: /* sortorder ::= ASC */
#line 786 "parse.y"
{yymsp[0].minor.yy502 = SQLITE_SO_ASC;}
#line 3351 "parse.c"
        break;
      case 131: /* sortorder ::= DESC */
#line 787 "parse.y"
{yymsp[0].minor.yy502 = SQLITE_SO_DESC;}
#line 3356 "parse.c"
        break;
      case 132: /* sortorder ::= */
#line 788 "parse.y"
{yymsp[1].minor.yy502 = SQLITE_SO_UNDEFINED;}
#line 3361 "parse.c"
        break;
      case 138: /* limit_opt ::= LIMIT expr */
#line 812 "parse.y"
{yymsp[-1].minor.yy182 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy182,0);}
#line 3366 "parse.c"
        break;
      case 139: /* limit_opt ::= LIMIT expr OFFSET expr */
#line 814 "parse.y"
{yymsp[-3].minor.yy182 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy182,yymsp[0].minor.yy182);}
#line 3371 "parse.c"
        break;
      case 140: /* limit_opt ::= LIMIT expr COMMA expr */
#line 816 "parse.y"
{yymsp[-3].minor.yy182 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy182,yymsp[-2].minor.yy182);}
#line 3376 "parse.c"
        break;
      case 141: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
#line 828 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy427, &yymsp[-1].minor.yy0);
  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy427,yymsp[0].minor.yy182,0,0);
}
#line 3384 "parse.c"
        break;
      case 144: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
#line 852 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy427, &yymsp[-3].minor.yy0);
  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy232,"set list"); 
  sqlite3Update(pParse,yymsp[-4].minor.yy427,yymsp[-1].minor.yy232,yymsp[0].minor.yy182,yymsp[-5].minor.yy502,0,0,0);
}
#line 3393 "parse.c"
        break;
      case 145: /* setlist ::= setlist COMMA nm EQ expr */
#line 862 "parse.y"
{
  yymsp[-4].minor.yy232 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy232, yymsp[0].minor.yy182);
  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy232, &yymsp[-2].minor.yy0, 1);
}
#line 3401 "parse.c"
        break;
      case 146: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
#line 866 "parse.y"
{
  yymsp[-6].minor.yy232 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy232, yymsp[-3].minor.yy510, yymsp[0].minor.yy182);
}
#line 3408 "parse.c"
        break;
      case 147: /* setlist ::= nm EQ expr */
#line 869 "parse.y"
{
  yylhsminor.yy232 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy182);
  sqlite3ExprListSetName(pParse, yylhsminor.yy232, &yymsp[-2].minor.yy0, 1);
}
#line 3416 "parse.c"
  yymsp[-2].minor.yy232 = yylhsminor.yy232;
        break;
      case 148: /* setlist ::= LP idlist RP EQ expr */
#line 873 "parse.y"
{
  yymsp[-4].minor.yy232 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy510, yymsp[0].minor.yy182);
}
#line 3424 "parse.c"
        break;
      case 149: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
#line 880 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy427, yymsp[-1].minor.yy399, yymsp[-2].minor.yy510, yymsp[-5].minor.yy502, yymsp[0].minor.yy198);
}
#line 3431 "parse.c"
        break;
      case 150: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
#line 884 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy427, 0, yymsp[-2].minor.yy510, yymsp[-5].minor.yy502, 0);
}
#line 3438 "parse.c"
        break;
      case 151: /* upsert ::= */
#line 895 "parse.y"
{ yymsp[1].minor.yy198 = 0; }
#line 3443 "parse.c"
        break;
      case 152: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
#line 898 "parse.y"
{ yymsp[-10].minor.yy198 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy232,yymsp[-5].minor.yy182,yymsp[-1].minor.yy232,yymsp[0].minor.yy182);}
#line 3448 "parse.c"
        break;
      case 153: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
#line 900 "parse.y"
{ yymsp[-7].minor.yy198 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy232,yymsp[-2].minor.yy182,0,0); }
#line 3453 "parse.c"
        break;
      case 154: /* upsert ::= ON CONFLICT DO NOTHING */
#line 902 "parse.y"
{ yymsp[-3].minor.yy198 = sqlite3UpsertNew(pParse->db,0,0,0,0); }
#line 3458 "parse.c"
        break;
      case 158: /* idlist_opt ::= LP idlist RP */
#line 914 "parse.y"
{yymsp[-2].minor.yy510 = yymsp[-1].minor.yy510;}
#line 3463 "parse.c"
        break;
      case 159: /* idlist ::= idlist COMMA nm */
#line 916 "parse.y"
{yymsp[-2].minor.yy510 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy510,&yymsp[0].minor.yy0);}
#line 3468 "parse.c"
        break;
      case 160: /* idlist ::= nm */
#line 918 "parse.y"
{yymsp[0].minor.yy510 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
#line 3473 "parse.c"
        break;
      case 161: /* expr ::= LP expr RP */
#line 957 "parse.y"
{yymsp[-2].minor.yy182 = yymsp[-1].minor.yy182;}
#line 3478 "parse.c"
        break;
      case 162: /* expr ::= ID|INDEXED */
      case 163: /* expr ::= JOIN_KW */ yytestcase(yyruleno==163);
#line 958 "parse.y"
{yymsp[0].minor.yy182=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 3484 "parse.c"
        break;
      case 164: /* expr ::= nm DOT nm */
#line 960 "parse.y"
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  yylhsminor.yy182 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
#line 3493 "parse.c"
  yymsp[-2].minor.yy182 = yylhsminor.yy182;
        break;
      case 165: /* expr ::= nm DOT nm DOT nm */
#line 965 "parse.y"
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
  yylhsminor.yy182 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
#line 3505 "parse.c"
  yymsp[-4].minor.yy182 = yylhsminor.yy182;
        break;
      case 166: /* term ::= NULL|FLOAT|BLOB */
      case 167: /* term ::= STRING */ yytestcase(yyruleno==167);
#line 972 "parse.y"
{yymsp[0].minor.yy182=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 3512 "parse.c"
        break;
      case 168: /* term ::= INTEGER */
#line 974 "parse.y"
{
  yylhsminor.yy182 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
#line 3519 "parse.c"
  yymsp[0].minor.yy182 = yylhsminor.yy182;
        break;
      case 169: /* expr ::= VARIABLE */
#line 977 "parse.y"
{
  if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
    u32 n = yymsp[0].minor.yy0.n;
    yymsp[0].minor.yy182 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy182, n);
  }else{
    /* When doing a nested parse, one can include terms in an expression
    ** that look like this:   #1 #2 ...  These terms refer to registers
    ** in the virtual machine.  #N is the N-th register. */
    Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
    assert( t.n>=2 );
    if( pParse->nested==0 ){
      sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
      yymsp[0].minor.yy182 = 0;
    }else{
      yymsp[0].minor.yy182 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
      if( yymsp[0].minor.yy182 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy182->iTable);
    }
  }
}
#line 3544 "parse.c"
        break;
      case 170: /* expr ::= expr COLLATE ID|STRING */
#line 997 "parse.y"
{
  yymsp[-2].minor.yy182 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy182, &yymsp[0].minor.yy0, 1);
}
#line 3551 "parse.c"
        break;
      case 171: /* expr ::= CAST LP expr AS typetoken RP */
#line 1001 "parse.y"
{
  yymsp[-5].minor.yy182 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy182, yymsp[-3].minor.yy182, 0);
}
#line 3559 "parse.c"
        break;
      case 172: /* expr ::= ID|INDEXED LP distinct exprlist RP */
#line 1006 "parse.y"
{
  if( yymsp[-1].minor.yy232 && yymsp[-1].minor.yy232->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
    sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
  }
  yylhsminor.yy182 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy232, &yymsp[-4].minor.yy0);
  if( yymsp[-2].minor.yy502==SF_Distinct && yylhsminor.yy182 ){
    yylhsminor.yy182->flags |= EP_Distinct;
  }
}
#line 3572 "parse.c"
  yymsp[-4].minor.yy182 = yylhsminor.yy182;
        break;
      case 173: /* expr ::= ID|INDEXED LP STAR RP */
#line 1015 "parse.y"
{
  yylhsminor.yy182 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
}
#line 3580 "parse.c"
  yymsp[-3].minor.yy182 = yylhsminor.yy182;
        break;
      case 174: /* term ::= CTIME_KW */
#line 1018 "parse.y"
{
  yylhsminor.yy182 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0);
}
#line 3588 "parse.c"
  yymsp[0].minor.yy182 = yylhsminor.yy182;
        break;
      case 175: /* expr ::= LP nexprlist COMMA expr RP */
#line 1022 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy232, yymsp[-1].minor.yy182);
  yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
  if( yymsp[-4].minor.yy182 ){
    yymsp[-4].minor.yy182->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
}
#line 3602 "parse.c"
        break;
      case 176: /* expr ::= expr AND expr */
      case 177: /* expr ::= expr OR expr */ yytestcase(yyruleno==177);
      case 178: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==178);
      case 179: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==179);
      case 180: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==180);
      case 181: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==181);
      case 182: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==182);
      case 183: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==183);
#line 1032 "parse.y"
{yymsp[-2].minor.yy182=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy182,yymsp[0].minor.yy182);}
#line 3614 "parse.c"
        break;
      case 184: /* likeop ::= NOT LIKE_KW|MATCH */
#line 1046 "parse.y"
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
#line 3619 "parse.c"
        break;
      case 185: /* expr ::= expr likeop expr */
#line 1047 "parse.y"
{
  ExprList *pList;
  int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
  yymsp[-1].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy182);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy182);
  yymsp[-2].minor.yy182 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0);
  if( bNot ) yymsp[-2].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy182, 0);
  if( yymsp[-2].minor.yy182 ) yymsp[-2].minor.yy182->flags |= EP_InfixFunc;
}
#line 3633 "parse.c"
        break;
      case 186: /* expr ::= expr likeop expr ESCAPE expr */
#line 1057 "parse.y"
{
  ExprList *pList;
  int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
  yymsp[-3].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy182);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy182);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy182);
  yymsp[-4].minor.yy182 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0);
  if( bNot ) yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy182, 0);
  if( yymsp[-4].minor.yy182 ) yymsp[-4].minor.yy182->flags |= EP_InfixFunc;
}
#line 3648 "parse.c"
        break;
      case 187: /* expr ::= expr ISNULL|NOTNULL */
#line 1069 "parse.y"
{yymsp[-1].minor.yy182 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy182,0);}
#line 3653 "parse.c"
        break;
      case 188: /* expr ::= expr NOT NULL */
#line 1070 "parse.y"
{yymsp[-2].minor.yy182 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy182,0);}
#line 3658 "parse.c"
        break;
      case 189: /* expr ::= expr IS expr */
#line 1091 "parse.y"
{
  yymsp[-2].minor.yy182 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy182,yymsp[0].minor.yy182);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy182, yymsp[-2].minor.yy182, TK_ISNULL);
}
#line 3666 "parse.c"
        break;
      case 190: /* expr ::= expr IS NOT expr */
#line 1095 "parse.y"
{
  yymsp[-3].minor.yy182 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy182,yymsp[0].minor.yy182);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy182, yymsp[-3].minor.yy182, TK_NOTNULL);
}
#line 3674 "parse.c"
        break;
      case 191: /* expr ::= NOT expr */
      case 192: /* expr ::= BITNOT expr */ yytestcase(yyruleno==192);
#line 1101 "parse.y"
{yymsp[-1].minor.yy182 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy182, 0);/*A-overwrites-B*/}
#line 3680 "parse.c"
        break;
      case 193: /* expr ::= MINUS expr */
#line 1105 "parse.y"
{yymsp[-1].minor.yy182 = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy182, 0);}
#line 3685 "parse.c"
        break;
      case 194: /* expr ::= PLUS expr */
#line 1107 "parse.y"
{yymsp[-1].minor.yy182 = sqlite3PExpr(pParse, TK_UPLUS, yymsp[0].minor.yy182, 0);}
#line 3690 "parse.c"
        break;
      case 195: /* between_op ::= BETWEEN */
      case 198: /* in_op ::= IN */ yytestcase(yyruleno==198);
#line 1110 "parse.y"
{yymsp[0].minor.yy502 = 0;}
#line 3696 "parse.c"
        break;
      case 197: /* expr ::= expr between_op expr AND expr */
#line 1112 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy182);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy182);
  yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy182, 0);
  if( yymsp[-4].minor.yy182 ){
    yymsp[-4].minor.yy182->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  } 
  if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy182, 0);
}
#line 3711 "parse.c"
        break;
      case 200: /* expr ::= expr in_op LP exprlist RP */
#line 1127 "parse.y"
{
    if( yymsp[-1].minor.yy232==0 ){
      /* Expressions of the form
      **
      **      expr1 IN ()
      **      expr1 NOT IN ()
      **
      ** simplify to constants 0 (false) and 1 (true), respectively,
      ** regardless of the value of expr1.
      */
      sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy182);
      yymsp[-4].minor.yy182 = sqlite3ExprAlloc(pParse->db, TK_INTEGER,&sqlite3IntTokens[yymsp[-3].minor.yy502],1);
    }else if( yymsp[-1].minor.yy232->nExpr==1 ){
      /* Expressions of the form:
      **
      **      expr1 IN (?1)
      **      expr1 NOT IN (?2)
      **
      ** with exactly one value on the RHS can be simplified to something
      ** like this:
      **
      **      expr1 == ?1
      **      expr1 <> ?2
      **
      ** But, the RHS of the == or <> is marked with the EP_Generic flag
      ** so that it may not contribute to the computation of comparison
      ** affinity or the collating sequence to use for comparison.  Otherwise,
      ** the semantics would be subtly different from IN or NOT IN.
      */
      Expr *pRHS = yymsp[-1].minor.yy232->a[0].pExpr;
      yymsp[-1].minor.yy232->a[0].pExpr = 0;
      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy232);
      /* pRHS cannot be NULL because a malloc error would have been detected
      ** before now and control would have never reached this point */
      if( ALWAYS(pRHS) ){
        pRHS->flags &= ~EP_Collate;
        pRHS->flags |= EP_Generic;
      }
      yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, yymsp[-3].minor.yy502 ? TK_NE : TK_EQ, yymsp[-4].minor.yy182, pRHS);
    }else{
      yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy182, 0);
      if( yymsp[-4].minor.yy182 ){
        yymsp[-4].minor.yy182->x.pList = yymsp[-1].minor.yy232;
        sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy182);
      }else{
        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy232);
      }
      if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy182, 0);
    }
  }
#line 3765 "parse.c"
        break;
      case 201: /* expr ::= LP select RP */
#line 1177 "parse.y"
{
    yymsp[-2].minor.yy182 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy182, yymsp[-1].minor.yy399);
  }
#line 3773 "parse.c"
        break;
      case 202: /* expr ::= expr in_op LP select RP */
#line 1181 "parse.y"
{
    yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy182, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy182, yymsp[-1].minor.yy399);
    if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy182, 0);
  }
#line 3782 "parse.c"
        break;
      case 203: /* expr ::= expr in_op nm dbnm paren_exprlist */
#line 1186 "parse.y"
{
    SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
    Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
    if( yymsp[0].minor.yy232 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy232);
    yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy182, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy182, pSelect);
    if( yymsp[-3].minor.yy502 ) yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy182, 0);
  }
#line 3794 "parse.c"
        break;
      case 204: /* expr ::= EXISTS LP select RP */
#line 1194 "parse.y"
{
    Expr *p;
    p = yymsp[-3].minor.yy182 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy399);
  }
#line 3803 "parse.c"
        break;
      case 205: /* expr ::= CASE case_operand case_exprlist case_else END */
#line 1202 "parse.y"
{
  yymsp[-4].minor.yy182 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy182, 0);
  if( yymsp[-4].minor.yy182 ){
    yymsp[-4].minor.yy182->x.pList = yymsp[-1].minor.yy182 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy232,yymsp[-1].minor.yy182) : yymsp[-2].minor.yy232;
    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy182);
  }else{
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy232);
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy182);
  }
}
#line 3817 "parse.c"
        break;
      case 206: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
#line 1214 "parse.y"
{
  yymsp[-4].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy232, yymsp[-2].minor.yy182);
  yymsp[-4].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy232, yymsp[0].minor.yy182);
}
#line 3825 "parse.c"
        break;
      case 207: /* case_exprlist ::= WHEN expr THEN expr */
#line 1218 "parse.y"
{
  yymsp[-3].minor.yy232 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy182);
  yymsp[-3].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy232, yymsp[0].minor.yy182);
}
#line 3833 "parse.c"
        break;
      case 210: /* case_operand ::= expr */
#line 1228 "parse.y"
{yymsp[0].minor.yy182 = yymsp[0].minor.yy182; /*A-overwrites-X*/}
#line 3838 "parse.c"
        break;
      case 213: /* nexprlist ::= nexprlist COMMA expr */
#line 1239 "parse.y"
{yymsp[-2].minor.yy232 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy232,yymsp[0].minor.yy182);}
#line 3843 "parse.c"
        break;
      case 214: /* nexprlist ::= expr */
#line 1241 "parse.y"
{yymsp[0].minor.yy232 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy182); /*A-overwrites-Y*/}
#line 3848 "parse.c"
        break;
      case 216: /* paren_exprlist ::= LP exprlist RP */
      case 221: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==221);
#line 1249 "parse.y"
{yymsp[-2].minor.yy232 = yymsp[-1].minor.yy232;}
#line 3854 "parse.c"
        break;
      case 217: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
#line 1256 "parse.y"
{
  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, 
                     sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy232, yymsp[-10].minor.yy502,
                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy182, SQLITE_SO_ASC, yymsp[-8].minor.yy502, SQLITE_IDXTYPE_APPDEF);
}
#line 3863 "parse.c"
        break;
      case 218: /* uniqueflag ::= UNIQUE */
      case 258: /* raisetype ::= ABORT */ yytestcase(yyruleno==258);
#line 1263 "parse.y"
{yymsp[0].minor.yy502 = OE_Abort;}
#line 3869 "parse.c"
        break;
      case 219: /* uniqueflag ::= */
#line 1264 "parse.y"
{yymsp[1].minor.yy502 = OE_None;}
#line 3874 "parse.c"
        break;
      case 222: /* eidlist ::= eidlist COMMA nm collate sortorder */
#line 1314 "parse.y"
{
  yymsp[-4].minor.yy232 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy232, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy502, yymsp[0].minor.yy502);
}
#line 3881 "parse.c"
        break;
      case 223: /* eidlist ::= nm collate sortorder */
#line 1317 "parse.y"
{
  yymsp[-2].minor.yy232 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy502, yymsp[0].minor.yy502); /*A-overwrites-Y*/
}
#line 3888 "parse.c"
        break;
      case 226: /* cmd ::= DROP INDEX ifexists fullname */
#line 1328 "parse.y"
{sqlite3DropIndex(pParse, yymsp[0].minor.yy427, yymsp[-1].minor.yy502);}
#line 3893 "parse.c"
        break;
      case 227: /* cmd ::= VACUUM */
#line 1334 "parse.y"
{sqlite3Vacuum(pParse,0);}
#line 3898 "parse.c"
        break;
      case 228: /* cmd ::= VACUUM nm */
#line 1335 "parse.y"
{sqlite3Vacuum(pParse,&yymsp[0].minor.yy0);}
#line 3903 "parse.c"
        break;
      case 229: /* cmd ::= PRAGMA nm dbnm */
#line 1342 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
#line 3908 "parse.c"
        break;
      case 230: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
#line 1343 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
#line 3913 "parse.c"
        break;
      case 231: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
#line 1344 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
#line 3918 "parse.c"
        break;
      case 232: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
#line 1346 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
#line 3923 "parse.c"
        break;
      case 233: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
#line 1348 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
#line 3928 "parse.c"
        break;
      case 236: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
#line 1364 "parse.y"
{
  Token all;
  all.z = yymsp[-3].minor.yy0.z;
  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy47, &all);
}
#line 3938 "parse.c"
        break;
      case 237: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
#line 1373 "parse.y"
{
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy502, yymsp[-4].minor.yy300.a, yymsp[-4].minor.yy300.b, yymsp[-2].minor.yy427, yymsp[0].minor.yy182, yymsp[-10].minor.yy502, yymsp[-8].minor.yy502);
  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
#line 3946 "parse.c"
        break;
      case 238: /* trigger_time ::= BEFORE|AFTER */
#line 1379 "parse.y"
{ yymsp[0].minor.yy502 = yymsp[0].major; /*A-overwrites-X*/ }
#line 3951 "parse.c"
        break;
      case 239: /* trigger_time ::= INSTEAD OF */
#line 1380 "parse.y"
{ yymsp[-1].minor.yy502 = TK_INSTEAD;}
#line 3956 "parse.c"
        break;
      case 240: /* trigger_time ::= */
#line 1381 "parse.y"
{ yymsp[1].minor.yy502 = TK_BEFORE; }
#line 3961 "parse.c"
        break;
      case 241: /* trigger_event ::= DELETE|INSERT */
      case 242: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==242);
#line 1385 "parse.y"
{yymsp[0].minor.yy300.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy300.b = 0;}
#line 3967 "parse.c"
        break;
      case 243: /* trigger_event ::= UPDATE OF idlist */
#line 1387 "parse.y"
{yymsp[-2].minor.yy300.a = TK_UPDATE; yymsp[-2].minor.yy300.b = yymsp[0].minor.yy510;}
#line 3972 "parse.c"
        break;
      case 244: /* when_clause ::= */
      case 263: /* key_opt ::= */ yytestcase(yyruleno==263);
#line 1394 "parse.y"
{ yymsp[1].minor.yy182 = 0; }
#line 3978 "parse.c"
        break;
      case 245: /* when_clause ::= WHEN expr */
      case 264: /* key_opt ::= KEY expr */ yytestcase(yyruleno==264);
#line 1395 "parse.y"
{ yymsp[-1].minor.yy182 = yymsp[0].minor.yy182; }
#line 3984 "parse.c"
        break;
      case 246: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
#line 1399 "parse.y"
{
  assert( yymsp[-2].minor.yy47!=0 );
  yymsp[-2].minor.yy47->pLast->pNext = yymsp[-1].minor.yy47;
  yymsp[-2].minor.yy47->pLast = yymsp[-1].minor.yy47;
}
#line 3993 "parse.c"
        break;
      case 247: /* trigger_cmd_list ::= trigger_cmd SEMI */
#line 1404 "parse.y"
{ 
  assert( yymsp[-1].minor.yy47!=0 );
  yymsp[-1].minor.yy47->pLast = yymsp[-1].minor.yy47;
}
#line 4001 "parse.c"
        break;
      case 248: /* trnm ::= nm DOT nm */
#line 1415 "parse.y"
{
  yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
  sqlite3ErrorMsg(pParse, 
        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
        "statements within triggers");
}
#line 4011 "parse.c"
        break;
      case 249: /* tridxby ::= INDEXED BY nm */
#line 1427 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4020 "parse.c"
        break;
      case 250: /* tridxby ::= NOT INDEXED */
#line 1432 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4029 "parse.c"
        break;
      case 251: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
#line 1445 "parse.y"
{yylhsminor.yy47 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-2].minor.yy232, yymsp[-1].minor.yy182, yymsp[-6].minor.yy502, yymsp[-7].minor.yy0.z, yymsp[0].minor.yy36);}
#line 4034 "parse.c"
  yymsp[-7].minor.yy47 = yylhsminor.yy47;
        break;
      case 252: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
#line 1449 "parse.y"
{
   yylhsminor.yy47 = sqlite3TriggerInsertStep(pParse->db,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy510,yymsp[-2].minor.yy399,yymsp[-6].minor.yy502,yymsp[-1].minor.yy198,yymsp[-7].minor.yy36,yymsp[0].minor.yy36);/*yylhsminor.yy47-overwrites-yymsp[-6].minor.yy502*/
}
#line 4042 "parse.c"
  yymsp[-7].minor.yy47 = yylhsminor.yy47;
        break;
      case 253: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
#line 1454 "parse.y"
{yylhsminor.yy47 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy182, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy36);}
#line 4048 "parse.c"
  yymsp[-5].minor.yy47 = yylhsminor.yy47;
        break;
      case 254: /* trigger_cmd ::= scanpt select scanpt */
#line 1458 "parse.y"
{yylhsminor.yy47 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy399, yymsp[-2].minor.yy36, yymsp[0].minor.yy36); /*yylhsminor.yy47-overwrites-yymsp[-1].minor.yy399*/}
#line 4054 "parse.c"
  yymsp[-2].minor.yy47 = yylhsminor.yy47;
        break;
      case 255: /* expr ::= RAISE LP IGNORE RP */
#line 1461 "parse.y"
{
  yymsp[-3].minor.yy182 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); 
  if( yymsp[-3].minor.yy182 ){
    yymsp[-3].minor.yy182->affinity = OE_Ignore;
  }
}
#line 4065 "parse.c"
        break;
      case 256: /* expr ::= RAISE LP raisetype COMMA nm RP */
#line 1467 "parse.y"
{
  yymsp[-5].minor.yy182 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); 
  if( yymsp[-5].minor.yy182 ) {
    yymsp[-5].minor.yy182->affinity = (char)yymsp[-3].minor.yy502;
  }
}
#line 4075 "parse.c"
        break;
      case 257: /* raisetype ::= ROLLBACK */
#line 1476 "parse.y"
{yymsp[0].minor.yy502 = OE_Rollback;}
#line 4080 "parse.c"
        break;
      case 259: /* raisetype ::= FAIL */
#line 1478 "parse.y"
{yymsp[0].minor.yy502 = OE_Fail;}
#line 4085 "parse.c"
        break;
      case 260: /* cmd ::= DROP TRIGGER ifexists fullname */
#line 1483 "parse.y"
{
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy427,yymsp[-1].minor.yy502);
}
#line 4092 "parse.c"
        break;
      case 261: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
#line 1490 "parse.y"
{
  sqlite3Attach(pParse, yymsp[-3].minor.yy182, yymsp[-1].minor.yy182, yymsp[0].minor.yy182);
}
#line 4099 "parse.c"
        break;
      case 262: /* cmd ::= DETACH database_kw_opt expr */
#line 1493 "parse.y"
{
  sqlite3Detach(pParse, yymsp[0].minor.yy182);
}
#line 4106 "parse.c"
        break;
      case 265: /* cmd ::= REINDEX */
#line 1508 "parse.y"
{sqlite3Reindex(pParse, 0, 0);}
#line 4111 "parse.c"
        break;
      case 266: /* cmd ::= REINDEX nm dbnm */
#line 1509 "parse.y"
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4116 "parse.c"
        break;
      case 267: /* cmd ::= ANALYZE */
#line 1514 "parse.y"
{sqlite3Analyze(pParse, 0, 0);}
#line 4121 "parse.c"
        break;
      case 268: /* cmd ::= ANALYZE nm dbnm */
#line 1515 "parse.y"
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4126 "parse.c"
        break;
      case 269: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
#line 1520 "parse.y"
{
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy427,&yymsp[0].minor.yy0);
}
#line 4133 "parse.c"
        break;
      case 270: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
#line 1524 "parse.y"
{
  yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
  sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
}
#line 4141 "parse.c"
        break;
      case 271: /* add_column_fullname ::= fullname */
#line 1528 "parse.y"
{
  disableLookaside(pParse);
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy427);
}
#line 4149 "parse.c"
        break;
      case 272: /* cmd ::= create_vtab */
#line 1538 "parse.y"
{sqlite3VtabFinishParse(pParse,0);}
#line 4154 "parse.c"
        break;
      case 273: /* cmd ::= create_vtab LP vtabarglist RP */
#line 1539 "parse.y"
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
#line 4159 "parse.c"
        break;
      case 274: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
#line 1541 "parse.y"
{
    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy502);
}
#line 4166 "parse.c"
        break;
      case 275: /* vtabarg ::= */
#line 1546 "parse.y"
{sqlite3VtabArgInit(pParse);}
#line 4171 "parse.c"
        break;
      case 276: /* vtabargtoken ::= ANY */
      case 277: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==277);
      case 278: /* lp ::= LP */ yytestcase(yyruleno==278);
#line 1548 "parse.y"
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
#line 4178 "parse.c"
        break;
      case 279: /* with ::= WITH wqlist */
      case 280: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==280);
#line 1563 "parse.y"
{ sqlite3WithPush(pParse, yymsp[0].minor.yy91, 1); }
#line 4184 "parse.c"
        break;
      case 281: /* wqlist ::= nm eidlist_opt AS LP select RP */
#line 1566 "parse.y"
{
  yymsp[-5].minor.yy91 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy232, yymsp[-1].minor.yy399); /*A-overwrites-X*/
}
#line 4191 "parse.c"
        break;
      case 282: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
#line 1569 "parse.y"
{
  yymsp[-7].minor.yy91 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy91, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy232, yymsp[-1].minor.yy399);
}
#line 4198 "parse.c"
        break;
      default:
      /* (283) input ::= cmdlist */ yytestcase(yyruleno==283);
      /* (284) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==284);
      /* (285) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=285);
      /* (286) ecmd ::= SEMI */ yytestcase(yyruleno==286);
      /* (287) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==287);
      /* (288) ecmd ::= explain cmdx */ yytestcase(yyruleno==288);
      /* (289) trans_opt ::= */ yytestcase(yyruleno==289);
      /* (290) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==290);
      /* (291) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==291);
      /* (292) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==292);
      /* (293) savepoint_opt ::= */ yytestcase(yyruleno==293);
      /* (294) cmd ::= create_table create_table_args */ yytestcase(yyruleno==294);
      /* (295) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==295);
      /* (296) columnlist ::= columnname carglist */ yytestcase(yyruleno==296);
      /* (297) nm ::= ID|INDEXED */ yytestcase(yyruleno==297);
      /* (298) nm ::= STRING */ yytestcase(yyruleno==298);
      /* (299) nm ::= JOIN_KW */ yytestcase(yyruleno==299);
      /* (300) typetoken ::= typename */ yytestcase(yyruleno==300);
      /* (301) typename ::= ID|STRING */ yytestcase(yyruleno==301);
      /* (302) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=302);
      /* (303) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=303);
      /* (304) carglist ::= carglist ccons */ yytestcase(yyruleno==304);
      /* (305) carglist ::= */ yytestcase(yyruleno==305);
      /* (306) ccons ::= NULL onconf */ yytestcase(yyruleno==306);
      /* (307) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==307);
      /* (308) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==308);
      /* (309) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=309);
      /* (310) tconscomma ::= */ yytestcase(yyruleno==310);
      /* (311) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=311);
      /* (312) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=312);
      /* (313) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=313);
      /* (314) oneselect ::= values */ yytestcase(yyruleno==314);
      /* (315) sclp ::= selcollist COMMA */ yytestcase(yyruleno==315);
      /* (316) as ::= ID|STRING */ yytestcase(yyruleno==316);
      /* (317) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=317);
      /* (318) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==318);
      /* (319) exprlist ::= nexprlist */ yytestcase(yyruleno==319);
      /* (320) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=320);
      /* (321) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=321);
      /* (322) nmnum ::= ON */ yytestcase(yyruleno==322);
      /* (323) nmnum ::= DELETE */ yytestcase(yyruleno==323);
      /* (324) nmnum ::= DEFAULT */ yytestcase(yyruleno==324);
      /* (325) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==325);
      /* (326) foreach_clause ::= */ yytestcase(yyruleno==326);
      /* (327) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==327);
      /* (328) trnm ::= nm */ yytestcase(yyruleno==328);
      /* (329) tridxby ::= */ yytestcase(yyruleno==329);
      /* (330) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==330);
      /* (331) database_kw_opt ::= */ yytestcase(yyruleno==331);
      /* (332) kwcolumn_opt ::= */ yytestcase(yyruleno==332);
      /* (333) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==333);
      /* (334) vtabarglist ::= vtabarg */ yytestcase(yyruleno==334);
      /* (335) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==335);
      /* (336) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==336);
      /* (337) anylist ::= */ yytestcase(yyruleno==337);
      /* (338) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==338);
      /* (339) anylist ::= anylist ANY */ yytestcase(yyruleno==339);
      /* (340) with ::= */ yytestcase(yyruleno==340);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
  return yyact;
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  sqlite3ParserTOKENTYPE yyminor         /* The minor type of the error token */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
#line 33 "parse.y"

  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
  if( TOKEN.z[0] ){
    sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
  }else{
    sqlite3ErrorMsg(pParse, "incomplete input");
  }
#line 4326 "parse.c"
/************ End %syntax_error code ******************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "sqlite3ParserAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
** use by the action routines.
**
** Inputs:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void sqlite3Parser(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  YYACTIONTYPE yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser = (yyParser*)yyp;  /* The parser */
  sqlite3ParserCTX_FETCH
  sqlite3ParserARG_STORE

  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  yyendofinput = (yymajor==0);
#endif

  yyact = yypParser->yytos->stateno;
#ifndef NDEBUG
  if( yyTraceFILE ){
    if( yyact < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
    }
  }
#endif

  do{
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action(yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor sqlite3ParserCTX_PARAM);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      break;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;
    }else{
      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);
      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos >= yypParser->yystack
            && yymx != YYERRORSYMBOL
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
      if( yymajor==YYNOCODE ) break;
      yyact = yypParser->yytos->stateno;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      break;
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      break;
#endif
    }
  }while( yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif
  return;
}
